Version

CardViewSettings Class

An object that exposes properties for controlling the features supported by the CardView. The CardView object is used by XamDataCards control and XamDataPresenter
Syntax
'Declaration
 
Public Class CardViewSettings 
   Inherits Infragistics.Windows.Controls.ViewSettingsBase
public class CardViewSettings : Infragistics.Windows.Controls.ViewSettingsBase 
Remarks

By manipulating properties on the CardViewSettings object you can control how the CardViewPanel arranges items.

The properties exposed by the CardViewSettings object are:

  • AllowCardWidthResizing - Returns/sets whether the end user can resize Card widths by selecting the right edge of card and dragging.
  • AllowCardHeightResizing - Returns/sets whether the end user can resize Card heights by selecting the bottom edge of card and dragging.
  • AutoFitCards - Returns/sets whether Card widths/heights are automatically increased to use up all available horizontal/vertical space.
  • CardHeight - Returns/sets the Height of each Card.
  • CardWidth - Returns/sets the Width of each Card.
  • CollapseCardButtonVisibility - Returns/sets whether a button is displayed in the Card header which can be clicked by the end user to collapse a Card so it shows its header only.
  • CollapseEmptyCellsButtonVisibility - Returns/sets whether a button is displayed in the Card header which can be clicked by the end user to collapse cells that contain empty values (e.g. empty string/null for string, null for nullable types, and 0 for numeric types).
  • HeaderPath - Returns/sets a string that represents the Path to a value on the source object that should be displayed as a Card header.
  • HeaderVisibility - Returns/sets the Visibility of the Card header.
  • InterCardSpacingX - Returns/sets the horizontal spacing between each Card.
  • InterCardSpacingY - Returns/sets the vertical spacing between each Card.
  • MaxCardCols - Returns/sets the maximum number of columns of Cards that should be displayed. A value of zero forces CardView to display as many columns as space will allow.
  • MaxCardRows - Returns/sets the maximum number of rows of Cards that should be displayed. A value of zero forces CardView to display as many rows as space will allow.
  • Orientation - Returns/sets a value that specifies the dimension in which child content is arranged.
  • Padding - Returns/sets the padding between the outermost cards and the bounds of the control.
  • RepositionAnimation - Returns/sets a DoubleAnimationBase derived instance that should be used when animating Cards to new layout positions.
  • ShouldAnimateCardPositioning - Returns/sets whether Cards should be animated into their new positions when the CardView is scrolled.
  • ShouldCollapseCards - Returns/sets whether Cards should be collapsed.
  • ShouldCollapseEmptyCells - Returns/sets whether cells whose value is determined to be empty (e.g. empty string/null for string, null for nullable types, and 0 for numeric types) will be collapsed and not displayed within the record.
Refer to the documentation contained within for a complete list of the properties supported by this class and the functionality enabled by each property.

Example
The following example code demonstrates how to reference the CardViewSettings using xamDataCards or xamDataPresenter.

Imports Infragistics.Windows.DataPresenter


'xamDataCards
Me.xamDataCards1.ViewSettings.ShouldCollapseEmptyCells = True

'xamDataPresenter
Dim cardView1 As CardView = TryCast(Me.xamDataPresenter1.View, CardView)

If cardView1 IsNot Nothing Then
    cardView1.ShouldCollapseEmptyCells = True
End If
using Infragistics.Windows.DataPresenter;


//xamDataCards
this.xamDataCards1.ViewSettings.ShouldCollapseEmptyCells = true;

//xamDataPresenter
CardView cardView1 = this.xamDataPresenter1.View as CardView;

if(cardView1 != null)
{
    cardView1.ShouldCollapseEmptyCells = true;
}
<!--xamDataCards-->
<igDP:XamDataCards Name="xamDataCards1">
    
<igDP:XamDataCards.ViewSettings>
        
<igDP:CardViewSettings ShouldCollapseEmptyCells="True" />
    
</igDP:XamDataCards.ViewSettings>
</igDP:XamDataCards>

<!--xamDataPresenter-->
<igDP:XamDataPresenter Name="xamDataPresenter1">
    
    
<!--If you do not set the View property, xamDataPresenter automatically uses a GridView object-->
    
<igDP:XamDataPresenter.View>
        
<igDP:CardView>
            
<igDP:CardView.ViewSettings>
                
<igDP:CardViewSettings ShouldCollapseEmptyCells="True"  />
            
</igDP:CardView.ViewSettings>
        
</igDP:CardView>
    
</igDP:XamDataPresenter.View>
</igDP:XamDataPresenter>

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also