Skip to main content
A newer version of this page is available. .

Item Template Designer

  • 2 minutes to read

The Item Template Designer is a design-time tool that is used to define the appearance of items and connectors for diagrams generated from a data source (DiagramDataBindingController and DiagramOrgChartController).

To invoke the Item Template Designer, switch to the design view, invoke the data controller’s smart tag and select the Run Template Designer item.

Run Template Designer

To define the appearance of items representing a data object, drag a template from the Template Designer category of the toolbox onto the canvas and apply the desired settings to it. Individual data fields can be represented by the Text and Image items. Items can be bound to data fields using the Item Data Binding Editor. To invoke it, double-click an item or click the template designer data icon item within it. To simply bind an item to a data field, type the name of the field. To build complex binding expressions, use the Criteria Language Syntax.

To define the appearance of connectors, drag a connector to the canvas and apply the desired settings to it.

By default, the uppermost connector/diagram item defined in XAML within the DiagramDataBindingControllerBase.TemplateDiagram is used as the template for the connectors/diagram items representing data objects.

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