I have a custom hexagon menu in wpf and want to rotate it
this is the rotation code
hexagonMenu1.RenderTransform = new RotateTransform(i,hexagonMenu1.Hexagon.ContainerRect.Width / 2, hexagonMenu1.Hexagon.ContainerRect.Height / 2);
when I call this code more than one it do nothing and panel not rotated , what can i do?
Thanks.
You would have to increase the rotation angle, i.e. your parameter
i, with each new RenderTransform.It would also be possible to reuse the existing RenderTransform and increase its Angle property:
You might also consider to animate the rotation angle, thus eliminating the need for looping over an increasing rotation angle: