You can name RotateTransform and then bind its properties. For example, in your "main" ui element, you define the transformation as follows:
<TextBlock Text="MainBox"> <TextBlock.RenderTransform> <RotateTransform Angle="20" CenterX="50" CenterY="50" x:Name="m"/> </TextBlock.RenderTransform> </TextBlock>
Then you can snap to this transformation from another element:
<TextBlock Text="SecondBox"> <TextBlock.RenderTransform> <RotateTransform Angle="{Binding Angle, ElementName=m}" CenterX="{Binding CenterX, ElementName=m}" CenterY="{Binding CenterY, ElementName=m}"/> </TextBlock.RenderTransform> </TextBlock>
Ben collier
source share