This project is read-only.

Environment.NewLine does not work with AddLabels

Feb 23, 2012 at 4:54 AM



The following line does not work if run through monodevelop IDE. Instead of a new line it displays small squares. Please help.

if (ContextEntityTypeEnum.STATION.Equals(layer.EntityType))
                           "Name: Pune" + Environment.NewLine + "Pressure: 10" ,
                           new System.Drawing.Font("Times New Roman", 7),
                mapLayer.IsSelected = true;




Feb 23, 2012 at 6:32 PM

I noticed that I was able to use an expression to get a newline in the label: "[LENGTH] \nSecond Line" (while using the GUI I press Ctrl+Enter to get the newline). Does this help any? I don't think there is any documented behavior in this regard and this behavior might change with other label symbolizers (for example, I could imagine one that parses HTML).