The default rotation behavior for all shapes on the diagram works around the center of the shape. I need to change this behavior to rotate around the top left corner of the shape/shapes. I need any sample code for this.
To customize this behavior you will need to create a custom rotation service that calculates the rotation point to be the top left position of the shape. I am attaching a sample project showing how to achieve that.
For more information on the tools and services of RadDiagram, you can check the following topics:
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Thanks Tanya for your sample project, it's really very helpful.
Now, I need to change the position of rotation icon to be on the top left corner on the selected shape/s instead of its current position (top center).
0
Tanya
Telerik team
answered on 05 May 2017, 08:53 AM
Hi Mohamed,
The way to change the position of the rotation handle should be done by customizing the default ControlTemplate of the ManipulationAdorner of RadDiagram. You can find more information regarding extracting and editing default control templates in this article.
Regards,
Tanya
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.