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, I just found out that I can simply set the IsReadOnly to true for the diagram and it will make the whole diagram ReadOnly mode. But I wanted also to be able to select the nodes to see what the data is and so on. I found that there is a "ReadOnlyCanSelect", I set to true but it still doesn't allow me to select the nodes? Anyways for me to make the whole diagram read only, can't delete, can't move the nodes, but can select it and deselect it?
thanks |
|
|
Your custom node style is probably a little out of date. Within the Triggers section of the custom node style you will see a data trigger that is binding to the DiagramSurface.IsReadOnly property. This trigger should have 4 setters inside it. Now, replace this trigger with these 3 triggers:
<DataTrigger Binding="{Binding IsReadOnly, RelativeSource={RelativeSource AncestorType={x:Type local:DiagramSurface}}}" Value="True"> Let me know if this doesn't solve it. - Jason |
|
|
Hi, that solved the problem, but another issue arises, the SelectedItems was going weird again this time after the first selection. The event OnSelectedElementsChanged() is being fired twice. Is this desirable? *I already updated to the 15 April nightly build which should fix the event. Maybe this is corner case? |
|
|
Thanks for pointing this out. A fix for this will be available through the nightly builds from tomorrow the 20th of April. - Jason |
|
|
Hi, I just got the latest nightly build installed. updated my projects, but the SelectedElementChanged() event still firing twice after the first select. Seems like the problem hasn't gone yet. Any idea? |
|
|
Ah, your probably using the Extended selection mode which I didn't include a fix for. I've fixed everything up now which you can get through the nightly builds from tomorrow the 22nd of April. - Jason |
|
|
Hi Jason, Just FYI, I installed the 23rd nightly build, the SelectedElementsChanged() event still been fired twice when I switch my selection from item to item. The logic seems to be like: you're setting the selectedItems = 0, then only you set the currently selectedItem back in. That's the reason I see it's been fired twice. Anyway, it doesn't gating us in our development, and i believe it shouldn't impact much on the performance as well, just that if you can fix it, that would be a cleaner event triggering. Else, we can still go on with current build. Thanks for your support anyway. ;) |
|
|
Hi Jason, I need your help on this again. FYI, I installed the latest nightly build, the SelectedElementsChanged() event seems to be fixed. Now it only fires ONCE whenever we select an item, however, when we're in READONLY mode, which when we turned on the ReadOnlyCanSelect, and we want to select an item, the selection changed event doesn't get triggered on the FIRST click, it will only be triggered when you select the second item. Moreover, it still fires twice in READONLY mode, which is not really consistent with the behaviour in normal mode. It's hard for us to accomodate the two different behaviours, could you fix the selection in READONLY mode as well? Thanks. |
|
|
Hello Thanks for pointing this out, I have fixed this so that readonly-select mode has the same event raising behaviour as normal mode. This fix is available through the nightly builds from tomorrow the 21st of May. - Jason |
|