Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

wpf axis label orientation

The orientation of the axes label orientation in my wpf graph doesn't seem to work correctly. For instance, setting vertical axis orientation to natural does not change anything while setting None makes the label perpendicular. The horizontal axis is similarly weird. Also, when the label orientation changes the label doesn't automatically move to compensate for the new label orientation until the size of the figure is changed. Is there a way around this?

0 Kudos
Message 1 of 2
(4,590 Views)

The default value of the LabelOrientation property is Natural, which is why you see no change when you explicitly assign that value. Natural tries to keep the baseline of the label towards the inside of the control, leaving labels that have a horizontal base orientation as-is. A value of None indicates that no rotation is applied, so the label will always be in the "standard" orientation, regardless of the orientation of the scale it is in.


I was able to reproduce the issue you were seeing where the initial position of the label is offset incorrectly when the label orientation is changed, and have a task to correct this behavior. I was able to force an update for some values by calling InvalidateMeasure and UpdateLayout, but this did not always work in all cases.

~ Paul H
0 Kudos
Message 2 of 2
(4,461 Views)