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
|
It would be good to have a compromise ReadOnly behavior. In this mode, you change the layout, but you could not change the structure of the diagram. For example, you could move nodes around, but you couldn't add/remove nodes or connections. Thanks, -Scott |
|
|
Hello Scott We have now provided a CanAddOrRemoveNodes boolean property which can prevent nodes from being added or removed from the diagram. And a CanModifyConnectivity boolean property which can prevent connections from being created, deleted, or relocated in the diagram. Both of these are found on DiagramSurface. Setting these both to false will get you the read only behavior that you have described. Nodes can still be moved around and connection segments can still be adjusted. Feel free to let us know if there are other areas of control that you would like in this behavior. For example, we have not yet provided a CanModifyNodeContent property. This will be available in the next nightly build at around 14:30GMT . Regards |
|
|
Any updates on the "CanModifyNodeContent"? I downloaded the trial to see if this is a component we can use in our project and I don't see the property? Also, are there events raised when items are selected or clicked on? Our ultimate goal is to design a flow chart in a designer, deploy a "Viewer" of this diagram and allow the end user to select a node which spawns off an event for us to load related data to that item. It would be nice to have a tag or key property for each node item that we can identify on selected item click. I know this is version 1.0 of your component so I share these as ideas. JDog |
|
|
Hello JDog We have now included a CanModifyNodeContent property on DiagramSurface. It is the responsibility of the style your using to use this property appropriatly so I have updated the standard styles to make sure that the TextBox in each node is read-only if the new property is set to false. < DataTrigger Binding="{Binding CanModifyNodeContent, RelativeSource={RelativeSource AncestorType={x:Type ms:DiagramSurface}}}" Value="False"><Setter TargetName="TextBox" Property="IsReadOnly" Value="True" /> </DataTrigger> This will use the new property to make the user interface act in the way that the property is defined. If you've got nodes that have multiple text boxes, or maybe even some other kind of control, then just provide the necessary setters inside the above DataTrigger. We have also included a SelectedElementChanged event on the DiagramSurface as you suggested which you can use to listen to when an element is selected such as by the user clicking on one. These fixes will all be available to you from our next nightly build. So you can pick them up tommorow (after about 1430 GMT) Cheers |
|