Skip to main content

DiagramItem.TemplateName Property

Identifies the item as a template used by data binding behaviors. This is a dependency property.

Namespace: DevExpress.Xpf.Diagram

Assembly: DevExpress.Xpf.Diagram.v22.1.dll

NuGet Package: DevExpress.Wpf.Diagram


public string TemplateName { get; set; }

Property Value

Type Description

A string value that is the name of the template.


By default, the uppermost connector and diagram item defined in XAML within the DiagramDataBindingBehaviorBase.TemplateDiagram are used as templates for the connectors and diagram items representing data objects.

You can use the DiagramDataBindingBehaviorBase.GenerateItem and DiagramDataBindingBehaviorBase.GenerateConnector events to implement custom logic for choosing the item and connector template. To do this, create diagram items/connectors in the DiagramDataBindingBehaviorBase.TemplateDiagram and specify their names using the TemplateName property. Specify the name of the desired template as the event’s CreateItemFromTemplate/CreateConnectorFromTemplate method parameter.

Alternatively, you can use the DiagramDataBindingBehaviorBase.ItemTemplateSelector property.

To learn more, see Item Template Designer.

See Also