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
|
I am already using the NodeContentTemplateSelector to switch Styles of my nodes depending on the Data type of each node. But now I need to give my users the option of switching the entire style of Diagram depending on a dropdown in my ViewModel. What I really need is multiple ways to choose the NodeContentTemplateSelector. For example, in Print mode, I still need my current Template to be chosen based on the Data type of the node, but I want less fields displayed in each node for printing. I thought I could switch out my Diagram Surface Formatter depending on that dropdown. That way I can have several Formatters ready to go and format the entire diagram based on what they choose but I can't seem to get the Formatter to switch dynamically. 1) Is this the right approach to doing this (switching out the Formatter)? Here is what I tried, but the DataTrigger never switches out the Formatter. Tracing shows the Trigger firing and detecting the 'Normal' or 'Print' value chosen in the dropdown but the Setter never applies the new Formatter :
|
|
|
Hi, Switching out the formatter is fine for changing the look of the whole diagram. I have not been able to reproduce why the Formatter is not being set for you, if you can provide a simple repro project then I'll look into it for you. -Jason Fauchelle |
|
|
When I switch the formatter, do I then need to rerender the diagram surface? |
|
|
No, when the Formatter property changes, it will go right ahead with applying the new styles to all the diagram elements. -Jason Fauchelle |
|