Author: okaravian | Posted on: 6/23/2008 8:42:51 AM | Views : 531

I want to add and rotate a new text block in my default grid named
LayoutRoot. I'm using this code to add new object for textblock in a
grid. it is working fine.

TextBlock tb = new TextBlock();
tb.Text = "This is aut generated text";
LayoutRoot.Children.Add(tb);
 
but I'm using this code to rotate this object but it doesn't work
((RotateTransform)((TransformGroup)tb.RenderTransform)).Angle = 45;
and it is also not working
((RotateTransform)((TransformGroup)tb.RenderTransform).Children[1]).Angle = 45;

anybody help me out. Thanks in advance. 
...

Go to the complete details ...