Skip to main content

BreadcrumbControl.ItemTemplate Property

Gets or sets a template that defines the presentation of items contained within the drop-down list. This is a dependency property.

Namespace: DevExpress.Xpf.Controls

Assembly: DevExpress.Xpf.Controls.v23.2.dll

NuGet Package: DevExpress.Wpf.Controls

Declaration

public DataTemplate ItemTemplate { get; set; }

Property Value

Type Description
DataTemplate

A DataTemplate object that represents the template which defines the presentation of items contained within the drop-down list.

Remarks

Use the ItemTemplate property to customize the layout and appearance of the items displayed within the nodes’ popups.

If you have more than one template that can be used to render items, you can implement custom logic to choose the required template. To do this, derive from the DataTemplateSelector class, implement the SelectTemplate method that returns a template which meets the required condition, and assign it to the ItemTemplateSelector property.

If both the ItemTemplate and ItemTemplateSelector are specified, task contents are rendered using the template returned by the template selector. If the template selector returns null, the template specified by the ItemTemplate property is used.

Example

<Window ... 
    xmlns:dxco="http://schemas.devexpress.com/winfx/2008/xaml/controls">
...
<dxco:BreadcrumbControl 
    ItemsSource="{Binding Documents}" 
    KeyMember="Id"
    ParentMember="ParentId" 
    DisplayMember="Title">
    <dxco:BreadcrumbControl.ItemTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <Image Source="{Binding Image}"/>
                <TextBlock Text="{Binding Text}" Margin="10,0,0,0"/>
            </StackPanel>
        </DataTemplate>
    </dxco:BreadcrumbControl.ItemTemplate>
</dxco:BreadcrumbControl>

See Also