Gets or sets custom style-selection logic that can be applied to each node.
Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf
C# Copy Code |
---|
public StyleSelector NodeStyleSelector { get; set; } |
Visual Basic Copy Code |
---|
Public Property NodeStyleSelector As StyleSelector |
An instance of the System.Windows.Controls.StyleSelector class.
When the selector's SelectStyle method is invoked, its item argument refers to a data item from NodesSource, and the container argument refers to the actual DiagramNode bound to the item.
The following selector returns one of two styles defined in a Xaml dictionary depending on the type of data item.
C# Copy Code |
---|
class CustomStyleSelector : StyleSelector FrameworkElement element = container as FrameworkElement; if (type is TaskItem) |
WpfDiagram Programmer's Guide | © 2024 MindFusion |