Hi I need rotate my axis labes in
CODE BEHIND.
My code:
Style labelStyle = new Style(typeof(AxisLabel));
var setter = new Setter(AxisLabel.RenderTransformProperty, new RotateTransform() { Angle = -60, CenterX = 40, CenterY = 30 });
labelStyle.Setters.Add(setter);
And it look like on this pick :
Pic
The problem is, that it rotate text on some coordinates and it rly sux.
Can someone help me to fix it ? I need to rotate labels and it must end or start on the same points near axis X.
Thanks
EDIT:
I edit my code like this :
var setter2 = new Setter(AxisLabel.RenderTransformOriginProperty, "1,0");
var setter = new Setter(AxisLabel.RenderTransformProperty, new RotateTransform() { Angle = 270 });
But that b..ch still remember his auto making position for fit the names (1. up, 2. down, 3. up,...)
Pic2
EDIT2:
i try this :
var setter = new Setter(AxisLabel.RenderTransformProperty, new RotateTransform() { Angle = -60, CenterX = (double)GetValue(AxisLabel.ActualHeightProperty) / 2, CenterY = (double)GetValue(AxisLabel.ActualWidthProperty) /2});
but actual H/W is always H/W of whole graph not each label in cathegory axis :/
I am only one who try rotate axis in code ???