Back to Devexpress

BreadcrumbControl.PathEditItemTemplate Property

wpf-devexpress-dot-xpf-dot-controls-dot-breadcrumbcontrol-e2bc7a82.md

latest3.8 KB
Original Source

BreadcrumbControl.PathEditItemTemplate Property

Gets or sets a template that defines the presentation of items displayed in a path edit popup. This is a dependency property.

Namespace : DevExpress.Xpf.Controls

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

NuGet Package : DevExpress.Wpf.Controls

Declaration

csharp
public DataTemplate PathEditItemTemplate { get; set; }
vb
Public Property PathEditItemTemplate As DataTemplate

Property Value

TypeDescription
DataTemplate

A template used to render breadcrumb items displayed in a path edit popup.

|

Remarks

When an end user edits a path by typing in the path edit box, the BreadcrumbControl displays a path edit popup. The popup contains items that meet the user’s input.

You can change the look and feel of the items displayed in a path edit popup. The PathEditItemTemplate property allows you to specify a template for these items.

If you have more than one template that can be used to render path edit popup 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 PathEditItemTemplateSelector property.

If both the PathEditItemTemplate and PathEditItemTemplateSelector are specified, the popup items are rendered using the template returned by the template selector. If the template selector returns null , the template specified by the PathEditItemTemplate property is used.

Example

xaml
<dxco:BreadcrumbControl 
    EmptyItemText="Start Here"
    ItemsSource="{Binding Documents}" 
    KeyMember="Id"
    ParentMember="ParentId" 
    DisplayMember="Title" 
    ImageMember="Image">
    <dxco:BreadcrumbControl.PathEditItemTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <Image Source="{Binding Image}" Height="16" Width="16"/>
                <TextBlock Text="{DXBinding Text}" Margin="10,0,0,0" Foreground="DarkGreen"/>
            </StackPanel>
        </DataTemplate>
    </dxco:BreadcrumbControl.PathEditItemTemplate>
</dxco:BreadcrumbControl>

The image below illustrates the result:

See Also

PathEditItemTemplateSelector

BreadcrumbControl Class

BreadcrumbControl Members

DevExpress.Xpf.Controls Namespace