Version

Working with Card Headers

The xamDataCards™ control automatically displays the value of the primary field in the header of each card. However, you can change this default behavior so that xamDataCards displays a different value in the headers or even hides the headers entirely.

If you want to display a value other than the primary field in the headers, you can set the CardViewSettings object’s HeaderPath property to the name of a property exposed by your data item.

If you want to hide the headers, you can set the CardViewSettings object’s HeaderVisibility property to Collapsed. However, if you hide the headers, the collapse card button and collapse empty cell buttons will not be available even if you enable those features.

xamDataCards Working with Card Headers 01.png

The following example code demonstrates how to set the header caption.

In XAML:

<igDP:XamDataCards Name="xamDataCards1" BindToSampleData="True">
    <igDP:XamDataCards.ViewSettings>
        <igDP:CardViewSettings HeaderPath="email" />
    </igDP:XamDataCards.ViewSettings>
</igDP:XamDataCards>

In Visual Basic:

Me.xamDataCards1.ViewSettings.HeaderPath = "email"

In C#:

this.xamDataCards1.ViewSettings.HeaderPath = "email";