Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.2.dll

NuGet Package: DevExpress.Wpf.Grid.Core

#Declaration

public DataTemplate CardHeaderTemplate { get; set; }

#Property Value

Type Description
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:

CardHeaderTemplate Example

<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