Is it possible to disable resizing for a particular shape?
I want it to be possible to enable resizing for certain shapes and disable it for other shapes.
Best Regards,
Peter
6 Answers, 1 is accepted
You can handle the PreviewResize routed event and check its arguments. If you encounter a shape that you don't want to resizable - you can mark the event as handled (e.Handled = true), thus prevent the actual resizing.
Please let us know if this works for you.
Miro Miroslavov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
It works, but i can't say it's an ideal solution. It would be much better if resizing could be turned of per shape. The user will still see the resizing handles on the shape and may wonder why it is not working for this particular shape.
I hope this feature will make it in the final release but thanks a lot for this alternative.
Best Regards,
Peter
You're right that it will be much better if you can set these properties on per shape level, but this also may have a lot of side effects for example if you select multiple shapes and some of them can or can not be modified and also other issues. But still I added work item for this scenario so that we can provide better API. You can track and vote for it here.
As a different workaround you can handle the SelectionChanged and if you encounter that a shape shouldn't be modifiable - you can set the diagram property and after that you can return it back to the previous value.
Miro Miroslavov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Yes, i realize that with multi-selection it can be a challenge. Thanks for putting up the idea for vote.
I will try your other workaround later today.
Best Regards,
Peter
Update: Yes, this definitively makes it a lot better.
I know this is not the right location.
But since this morning there is something wrong with the website of telerik on IE9.
See screenshot.
It's very difficult to get anything done on the website right now. I tried this on two different laptops, same result.
Best Regards,
Peter
I forward your issue to the respecting guys and here is the answer. "We are aware of the problem and we are currently working on a permanent fix. A temporary solution is to clear the browser cache."
I'm happy that the second workaround is doing better work. Still we'll try to make it easier and straight forward.
Miro Miroslavov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>