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, Is there a tool tip in node? |
|
|
Hello Voldamirin Yes, you can do this by setting the ToolTip property on a custom DiagramNodeElement style. You can see examples of creating and applying custom styles in the CustomStyle.FlowDiagrams sample that is installed with WPF Diagrams. In a resource dictionary, create a new style with DiagramNodeElement as the TargetType. In this style use a Setter to set the ToolTip property. This could either be a hard coded string, or a binding to a property on the IDiagramNode model object such as the Data property or your own property if you've implemented a custom node. Next create a ShapeNodeStyleSelector and add a TypeStyle object to map your custom style from the previous step to the type of node you want it to be applied to. Finally, create a DiagramFormatter, set the NodeStyleSelector property to be the ShapeNodeStyleSelector and then set the Formatter property of the DiagramSurface to be that DiagramFormatter. All this is demonstrated in the CustomStyle.FlowDiagrams sample (apart from setting the tool tip). Please let me know if you have any questions about this. Jason Fauchelle |
|