This is a migrated thread and some comments may be shown as answers.

Non resizable shape

6 Answers 87 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
HDC
Top achievements
Rank 1
HDC asked on 17 Apr 2012, 09:09 PM
Hi,

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

Sort by
0
Accepted
Miro Miroslavov
Telerik team
answered on 18 Apr 2012, 06:36 AM
Hi Peter,

 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. 

Kind regards,
Miro Miroslavov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
HDC
Top achievements
Rank 1
answered on 18 Apr 2012, 05:40 PM
Hi Miro,

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

0
Accepted
Miro Miroslavov
Telerik team
answered on 19 Apr 2012, 09:03 AM
Hi 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. 

All the best,
Miro Miroslavov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
HDC
Top achievements
Rank 1
answered on 19 Apr 2012, 09:16 AM
Hi Miro,

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.
0
HDC
Top achievements
Rank 1
answered on 19 Apr 2012, 05:49 PM
Hi,

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
0
Miro Miroslavov
Telerik team
answered on 20 Apr 2012, 10:18 AM
Hi 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.

All the best,
Miro Miroslavov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Diagram
Asked by
HDC
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
HDC
Top achievements
Rank 1
Share this question
or