GoXam for WPF v3
FindTemplateForNode Method
Northwoods.GoXam Namespace > PartManager Class : FindTemplateForNode Method
Given a category and the node data, find a DataTemplate to use in making the Node or Group.
Syntax
protected virtual DataTemplate FindTemplateForNode( 
   object nodedata,
   IDiagramModel model,
   bool isgroup,
   bool islinklabel,
   string category
)

Parameters

nodedata
model
isgroup
islinklabel
category

Return Value

a DataTemplate taken from either NodeTemplate or NodeTemplateDictionary (or if isgroup is true, from either GroupTemplate or GroupTemplateDictionary), or null if no template is found
Remarks

The search for a data template looks in different places depending on the value of isgroup. For the default category (the empty string ""), this uses NodeTemplate (or GroupTemplate) if it is non-null, or else the default entry ("") in the NodeTemplateDictionary (or GroupTemplateDictionary) if there is a dictionary. For any other category, this looks up the category in the NodeTemplateDictionary (or GroupTemplateDictionary) if there is a dictionary, and if that fails it uses NodeTemplate (or GroupTemplate) or the default entry in the dictionary. This may return null if no appropriate template is found for the category. The result is used in a call to MakeNodeForData.

You may wish to override this method to customize the selection of the template based on the node data.

See Also

Reference

PartManager Class
PartManager Members