All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

TreeViewControl.NodeContentDisplayTemplateSelector Property

Gets or sets an object that chooses a node value template based on custom logic. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.2.dll

Declaration

public DataTemplateSelector NodeContentDisplayTemplateSelector { get; set; }
Public Property NodeContentDisplayTemplateSelector As DataTemplateSelector

Property Value

Type Description
DataTemplateSelector

A DataTemplateSelector descendant that chooses a template based on custom logic.

Remarks

The NodeContentDisplayTemplate property specifies a template that displays node values. If you have more than one display template, you can implement custom logic to choose the required template:

  1. Create a template selector - a class that chooses a template based on a condition. This class should derive from the DataTemplateSelector class.
  2. Override the SelectTemplate method to return a template that meets the required condition.
  3. Assign the template selector class instance to the NodeContentDisplayTemplateSelector property.

If you specify both the NodeContentDisplayTemplate and NodeContentDisplayTemplateSelector, the TreeViewControl uses the template returned by the template selector.

If the template selector returns null, the TreeViewControl uses the template specified by the NodeContentDisplayTemplate property.

See Also