Visual Basic (Declaration) | |
---|---|
Public Class PartManager Inherits System.Windows.FrameworkElement |
C# | |
---|---|
public class PartManager : System.Windows.FrameworkElement |
Each Diagram has an instance of this class as its PartManager property. If you want to customize the standard behavior, you can easily override any of its methods and substitute an instance of your custom part manager class for your diagram.
public class CustomPartManager : PartManager { protected override String FindCategoryForNode(Object nodedata, IDiagramModel model, bool isgroup, bool islinklabel) { // maybe choose different category here, to dynamically determine the DataTemplate found by FindTemplateForNode } }and install it with either XAML:
<go:Diagram ...> <go:Diagram.PartManager> <local:CustomPartManager /> </go:Diagram.PartManager> </go:Diagram>or in the initialization of your Diagram control:
myDiagram.PartManager = new CustomPartManager();
Although this class inherits from FrameworkElement
in order to support data binding, it is not really a FrameworkElement
or UIElement
! Please ignore all of the properties, methods, and events defined by FrameworkElement
and UIElement
.
System.Object
System.Windows.DependencyObject
System.Windows.UIElement
System.Windows.FrameworkElement
Northwoods.GoXam.PartManager