Back to Devexpress

CardView.CardHeaderTemplate Property

wpf-devexpress-dot-xpf-dot-grid-dot-cardview-d00d1d00.md

latest2.5 KB
Original Source

CardView.CardHeaderTemplate Property

Gets or sets the template that defines the presentation of card headers. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

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

Property Value

TypeDescription
DataTemplate

A DataTemplate object that defines the presentation of card headers.

|

Remarks

The template’s data context is a CardHeaderData object.

The following code sample demonstrates how to use the CardHeaderTemplate property to display images in card headers:

xaml
<Window ...
        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
        xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
<!-- ... -->
<dxg:CardView.CardHeaderTemplate>
    <DataTemplate>
        <StackPanel Orientation="Horizontal">
            <Image Source="{dx:DXImage 'SvgImages/Icon Builder/Actions_CheckCircled.svg'}"
                   Width="16" Height="16" VerticalAlignment="Center"
                   Visibility="{Binding RowData.Row.Delivered, Converter={dxmvvm:BooleanToVisibilityConverter}}"/>
            <TextBlock Text="{Binding RowData.Row.ProductName}"/>
        </StackPanel>
    </DataTemplate>
</dxg:CardView.CardHeaderTemplate>

Refer to the following help topic for more information: Card Settings.

See Also

CardHeaderTemplateSelector

CardView Class

CardView Members

DevExpress.Xpf.Grid Namespace