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 want to hide one node in DiagramSurface while keep other nodes visible. How can I do this by code. Thank you very much! Andy |
|
|
Hi Andy, Unfortunately setting the visibility of a node is not a built in feature, so will require a bit of work. It's certainly possible though, and you can see an example of how to do this in the NodeGrouping sample provided with WPF Diagrams. You will need to have your own node model class(es) that extend one of the provided node classes such as DiagramNode. On your custom node class, you'll add your property to control the visibility. In your custom node style, you'd use a style trigger to listen to your visibility property, and set the Visibility of the node element to hidden. Here's an example of the trigger straight from the NodeGrouping sample (where the property on the node model that controls visibility is called IsVisible):
Let me know if you have further questions about doing this. -Jason Fauchelle |
|