![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Finding a RotateTransform somewhere in the visual tree I need to find out the rotate transform applied from a low level part of the tree, e.g. Lets say I have the following: <StackPanel x:Name="commonpanel"> <StackPanel x:Name="foo1"> <StackPanel.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> <SkewTransform AngleX="0" AngleY="0"/> <RotateTransform Angle="90"/> <TranslateTransform X="0" Y="0"/> </TransformGroup> </StackPanel.RenderTransform> <TextBlock x:Name="textFoo1">Foo1</TextBlock> </StackPanel> <StackPanel x:Name="foo2"> <StackPanel.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> <SkewTransform AngleX="0" AngleY="0"/> <RotateTransform Angle="180"/> <TranslateTransform X="0" Y="0"/> </TransformGroup> </StackPanel.RenderTransform> <TextBlock x:Name="textFoo2">Foo2</TextBlock> </StackPanel> </StackPanel> In my case I need to find the current angle of the 'textFoo1' & 'textFoo2' visual elements, in relation to the 'commonpanel' visual element. textFoo1.TransformToAncestor(commonpanel) does not seem to help as it returns a GeneralTransform.. The code that needs to do this is generic, I.e. The StackPanel/Angle etc might not exist at all. Any ideas ? Regards Andrew |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Err.Number 486, Vista Ultimate, Visual Studio, & Visual Basic | Vista General | |||
| Running Visual C++ and/or Visual Basic under Vista Home Premium OS | Vista General | |||
| Tree | PowerShell | |||
| Visual Studio 6 and Visual Source Safe 6 on Vista | Vista General | |||