Version

About Card Sizing

The xamDataCards™ control offers several different ways to set the height and width of its cards.

  • You can specify the cards' width or height by setting the CardViewSettings object’s CardWidth or CardHeight properties, respectively.

  • You can allow your end users to resize the cards' width or height at run time by setting the CardViewSettings object’s AllowCardWidthResizing or AllowCardHeightResizing properties to True. The xamDataCards control synchronizes resizing operations across all cards.

  • You can automatically stretch the cards to take up all the available space within the xamDataCards control by setting the CardViewSettings object’s AutoFitCards property to an AutoFitCards enum value. The xamDataCards control can stretch cards horizontally, vertically or both.

xamDataCards About Card Sizing 01.png

The following example code demonstrates how to make the cards automatically take up all the available space.

In XAML:

<igDP:XamDataCards Name="xamDataCards1">
    <igDP:XamDataCards.ViewSettings>
        <igDP:CardViewSettings AutoFitCards="HorizontallyAndVertically" />
    </igDP:XamDataCards.ViewSettings>
</igDP:XamDataCards>

In Visual Basic:

Imports Infragistics.Windows.DataPresenter
...
Me.xamDataCards1.ViewSettings.AutoFitCards = AutoFitCards.HorizontallyAndVertically
...

In C#:

using Infragistics.Windows.DataPresenter;
...
this.xamDataCards1.ViewSettings.AutoFitCards = AutoFitCards.HorizontallyAndVertically;
...