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.NodeContentDisplayTemplate Property

Gets or sets a template that displays node values. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

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

Declaration

public DataTemplate NodeContentDisplayTemplate { get; set; }
Public Property NodeContentDisplayTemplate As DataTemplate

Property Value

Type Description
DataTemplate

The template that displays node values.

Remarks

You can use separate in-place editors to display and edit data. The TreeViewControl includes templates that allow you to define editors that display (when the control is in browse mode) and edit (when the control is in edit mode) node values:

Template Description
NodeContentDisplayTemplate The template that displays node values.
NodeContentEditTemplate The template that displays an editor used to edit node values.

Specify the NodeContentTemplate property if you want to use the same template to display and edit data.

Example

The following code sample displays wrapped text but does not wrap that text in the editor:

<dxg:TreeViewControl ..."
                     AllowEditing="True">
    <dxg:TreeViewControl.NodeContentDisplayTemplate>
        <DataTemplate>
            <dxe:TextEdit x:Name="PART_Editor" TextWrapping="Wrap" MaxWidth="100"/>
        </DataTemplate>
    </dxg:TreeViewControl.NodeContentDisplayTemplate>
</dxg:TreeViewControl>

If you have more than one display template, use the NodeContentDisplayTemplateSelector property to implement custom logic to choose the required template.

TIP
See Also