This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, In our model we're subclassing DiagramNode and setting IsResizable to false in the constructor. Even though that is done, when the node is selected the handles for resizing (a dashed square surrounding the shape) are showing. I'm wondering if there's a different reason for those to show. I want to take them out simply because they don't look aesthetically pleasing and they're completely unnecessary in my scenario. Thanks for any input, Ezequiel Sculli |
|
|
Hello Ezequiel The only way I know for this to happen is if you have a custom node style containing the ResizeThumb, but no trigger to hide it if IsResizable is false. If this is the case, let me know if you need help adjusting your custom node style. If this is not the case, please send a repro project, or more information you think may be related. If you go to the ActivityDiagrams demo (installed with WPF Diagrams) and set IsResizable to false in one of the node implementations, you'll see that it works as expected. Jason Fauchelle |
|
|
Hi! I'm working with Ezequiel on this issue, so here goes: I do agree with what you say (IsResizable false should hide the handles). That doesn't seem to work, though, and the only thing we're changing is the NodeTemplate of the node. We have a separate project where we're doing basically the same thing and it works wonderfully. What can I send you that will make resolving this issue faster? (full code is not an option, I think). Also, is there any other trigger or condition on the handles? The tamplate is a simple grid with some items inside it, and nothing more. Thanks, J |
|
|
Hello Joaquin and Ezequiel The one other thing that can effect the visibility of the resizer is the DiagramSurface.ReadOnlyCanSelect property. The resizer doubles as the selection indicator, so when ReadOnlyCanSelect is set to true, the resizer will always be visible when a node is selected. If this is the case, you will notice that you can't drag any of the black parts of the resizer because IsResizable on the node is false. You will need to remove the ReadOnlyCanSelect property (or set it to false) to resolve this issue. You'll still be able to logically select nodes, but there won't be any visual indication of it. If you need a way to show that a node is selected, you'd need to create a custom node style and override the Template property which is what other people have done - let me know if you need assistance with this. Also let me know if the ReadOnlyCanSelect property is not applicable in your case. Jason Fauchelle |
|
|
That solved it! And since I already had a visual indication of selection anyway, it looks perfect now. Super thanks, J |
|
|
Excellent! great to hear it's all sorted out. |
|