This is a migrated thread and some comments may be shown as answers.

Angle property in RotateTransform class (Silverligth project)

1 Answer 42 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Carlos Marcão
Top achievements
Rank 2
Carlos Marcão asked on 07 Jul 2010, 03:53 PM
Hello!

I have a Canvas with Transformations applied(one of them is a RotateTransform). WebAii framework allows us to access to all transformations and its properties, unfortunately when I try to change a property, namly Angle in RotateTransform object, the change is not propagated to interface. Is framework working properly? Or I'm using it incorrectly?

Sample
...
ArtOfTest.WebAii.Silverlight.UI.Rectangle rotateRectangle = wk.Find.ByName<ArtOfTest.WebAii.Silverlight.UI.Rectangle>("RotateHandle");
 RotateTransform rotateTransform = (_canvas.RenderTransform as TransformGroup).Children.Single(x => x.GetType() == typeof(RotateTransform)) as RotateTransform;

//It starts with 0º degrees
rotateTransform.Angle+=50; //Nothing happen in interface, but if I change the rotation using interface, correct value is available.

Thanks in advance,

Carlos Marcão

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 08 Jul 2010, 10:30 PM
Hello Carlos,

I got this working on a local repro of this:

ArtOfTest.WebAii.Silverlight.UI.Rectangle rotateRectangle = wk.Find.ByName<ArtOfTest.WebAii.Silverlight.UI.Rectangle>("RotateHandle");
RotateTransform t = rotateRectangle.RenderTransform as RotateTransform;
t.Angle += 50;

But your transform maybe much more complicated then what I was doing. Could you send us an example of the transform you are doing?

Regards,
Nelson Sin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Carlos Marcão
Top achievements
Rank 2
Answers by
Missing User
Share this question
or