[DebuggerDisplay("Count = {Count}")] [DefaultMember("Item")] [DebuggerTypeProxy(System.Collections.Generic.IDictionaryDebugView`2)] [Serializable()] public class DataTemplateDictionary : System.Collections.Generic.Dictionary<string,DataTemplate>
DataTemplates
indexed by category names.[DebuggerDisplay("Count = {Count}")] [DefaultMember("Item")] [DebuggerTypeProxy(System.Collections.Generic.IDictionaryDebugView`2)] [Serializable()] public class DataTemplateDictionary : System.Collections.Generic.Dictionary<string,DataTemplate>
There are three standard template collections: Diagram.NodeTemplateDictionary, Diagram.GroupTemplateDictionary, and Diagram.LinkTemplateDictionary. You can swap whole sets of data templates at once by setting those three properties.
However, the Diagram properties: Diagram.NodeTemplate, Diagram.GroupTemplate, and Diagram.LinkTemplate take precedence over the Default value in this dictionary.
Caution: if you create a DataTemplateDictionary
in XAML as the value of a Style Setter, that dictionary will be shared by all diagrams affected by that style. The same is true if you create the DataTemplateDictionary
as a resource and refer to it in more than one diagram.
An instance of this dictionary may be shared by multiple Diagrams. However, if you modify this dictionary, no Diagram will be notified of such a change until you explicitly call Diagram.RaiseTemplatesChanged.
System.Object
System.Collections.Generic.Dictionary<TKey,TValue>
Northwoods.GoXam.DataTemplateDictionary