ArcGIS .Net Runtime, TextSymbol class issue (Offset)

3468
1
Jump to solution
12-15-2014 12:56 AM
EdL
by
New Contributor II

private LabelProperties InitLabels()

{

            LabelProperties property = new LabelProperties();

            AttributeLabelClass attrLabel = new AttributeLabelClass();

            attrLabel.TextExpression = string.Format("[{0}]", attributeLabel);

            attrLabel.LabelPosition = LabelPosition.FixedPositionWithOverlaps;

            attrLabel.Symbol = new TextSymbol

            {

                BackgroundColor = Colors.Yellow,

                Color = Colors.Black,

                YOffset = 200

            };

 

            attrLabel.IsWordWrapEnabled = true;

            attrLabel.WordWrapLength = 30;

 

            property.LabelClasses.Add(attrLabel);

            return property;

}

 

I have a simple method to create a label property to apply to a GraphicsOverlay. After applying the above, the label offset does not seem to be offsetting the labels at all.

A value of 200 should display the label significantly far away from the actual graphic point but no change is noticed. The same method is applied to a GraphicsLayer but no change is seen.

 

Is there a fix to this?

0 Kudos
1 Solution

Accepted Solutions
AsserSwelam1
Occasional Contributor

Hi Ed,

Actually that's a limitation with the AttributeLabelClass. The positioning properties (XOffset , YOffset , Angle and AngleAlignment) is not supported for AttributeLabelClass.Symbol.

Thanks,

Asser

View solution in original post

0 Kudos
1 Reply
AsserSwelam1
Occasional Contributor

Hi Ed,

Actually that's a limitation with the AttributeLabelClass. The positioning properties (XOffset , YOffset , Angle and AngleAlignment) is not supported for AttributeLabelClass.Symbol.

Thanks,

Asser

0 Kudos