Angle property in RotateTransform class (Silverligth project)

2 posts, 0 answers
  1. Carlos Marcão
    Carlos Marcão avatar
    9 posts
    Member since:
    Jun 2010

    Posted 07 Jul 2010 Link to this post


    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?

    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
  2. Missing user
    Missing user avatar

    Posted 08 Jul 2010 Link to this post

    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?

    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
Back to Top