Version

Set the Space Between Cards

The xamDataCards™ control automatically adds a little space between adjacent cards. However, you can change the amount of space between adjacent cards by setting the CardViewSettings object’s InterCardSpacingX and InterCardSpacingY properties to a double value greater than 0. The InterCardSpacingX property determines the space to the right of each card and the InterCardSpacingY property determines the space underneath each card.

xamDataCards Set the Space Between Cards 01.png

The following example code demonstrates how to set the space between cards.

In XAML:

<igDP:XamDataCards Name="xamDataCards1" BindToSampleData="True">
    <igDP:XamDataCards.ViewSettings>
        <igDP:CardViewSettings InterCardSpacingX="20" InterCardSpacingY="10" />
    </igDP:XamDataCards.ViewSettings>
</igDP:XamDataCards>

In Visual Basic:

Me.xamDataCards1.ViewSettings.InterCardSpacingX = 20
Me.xamDataCards1.ViewSettings.InterCardSpacingY = 10

In C#:

this.xamDataCards1.ViewSettings.InterCardSpacingX = 20;
this.xamDataCards1.ViewSettings.InterCardSpacingY = 10;