Version

CarouselView Class

ViewBase derived class that defines settings and defaults for a view that arranges data along a user defined path.
Syntax
'Declaration
 
Public Class CarouselView 
   Inherits ViewBase
public class CarouselView : ViewBase 
Remarks

The CarouselView object is used by XamDataCarousel and XamDataPresenter to provide settings and defaults that DataPresenterBase (the base class for the XamDataCarousel and XamDataPresenter controls) can query when it provides UI element generation and field layout generation services in support of the View. While the CarouselView is not actually reponsible for arranging items, it does expose a property called ItemsPanelType that returns the System.Windows.Controls.Panel derived type that should be used to provide layout functionality for DataRecords displayed in the view. DataPresenterBase will ensure that a panel of ItemsPanelType is generated for use by the embedded RecordListControl (the System.Windows.Controls.ListBox derived class used to display DataRecords).

The CarouselView object exposes a property called ViewSettings that returns a Infragistics.Windows.Controls.CarouselViewSettings object. (Note: This property is not found on the ViewBase class but is specific to the CarouselView). Infragistics.Windows.Controls.CarouselViewSettings in turn exposes a number of properties that let you control all aspects of layout and visual effects supported by the CarouselView. This is the same object that is returned from the Infragistics.Windows.Controls.XamCarouselPanel.ViewSettings and Infragistics.Windows.Controls.XamCarouselListBox.ViewSettings properties. Refer to Infragistics.Windows.Controls.CarouselViewSettings object for detailed information on these properties.

Note: CarouselView is only used by the XamDataPresenter control (as described above) when the XamDataPresenter control's XamDataPresenter.View property is set to an instance of CarouselView.

The following ViewBase properties are overridden by the CarouselView:

Property Description Overridden Value
CellPresentation Returns the type of CellPresentation used by the view which determines the default manner in which the cells within each row are laid out by the FieldLayoutTemplateGenerator. CellPresentation.CardView
DefaultAutoArrangeCells Returns the default value for AutoArrangeCells for field layout templates generated on behalf of the View. AutoArrangeCells.TopToBottom
DefaultAutoArrangeMaxColumns Returns the default maximum number of columns of cells to auto-generate in the field layout templates. 1
DefaultAutoArrangeMaxRows Returns the default maximum number of rows of cells to auto-generate in the field layout templates. 3
DefaultAutoFit Returns the default value for the resolved value for the DataPresenterBase.AutoFit if that property is set to null (Nothing in VB), its default value. true
DefaultCellClickAction Returns the default CellClickAction for cells in the View. CellClickAction.SelectCell
DefaultLabelClickAction Returns the default LabelClickAction for cells in the View. LabelClickAction.Nothing
DefaultLabelLocation Returns the default LabelLocation for Field Labels in the View. LabelLocation.Hidden
HasLogicalOrientation Returns a value that indicates whether this View arranges its descendants in a particular dimension. false
HorizontalScrollBarVisibility Returns a value that indicates when the horizontal scrollbar should be shown in this view. System.Windows.Controls.ScrollBarVisibility.Hidden
IsAddNewRecordSupported Determines if the DataPresenterBase allows an AddNew record to be displayed in the View. false
IsAutoFitHeightSupported Returns true if the height of the cells within in each row should be adjusted so that all cells will fit within the vertical space available for the row. false
IsAutoFitWidthSupported Returns true if the width of the cells within in each row should be adjusted so that all cells will fit within the horizontal space available for the row. true
IsLogicalFieldHeightResizingAllowed Returns true if the DataPresenterBase UI should allow logical field heights in this View to be resized. false
IsLogicalFieldWidthResizingAllowed Returns true if the DataPresenterBase UI should allow fields in this View to be resized. false
IsNestedPanelsSupported Returns true if the View supports nested panels to display hierarchical data. false
ItemsPanelType Returns the type of System.Windows.Controls.Panel used by the view to layout items in the list. typeof(CarouselViewPanel)
RecordPresenterContainerType Returns the type used as the container (if any) for RecordPresenters in the View. typeof(CarouselItem)
ShouldDisplayRecordSelectors Returns true if the DataPresenterBase should generate and display a record selector for each record in the View. false
SupportedDataDisplayMode Returns a value that indicates the DataDisplayMode supported by the View. DataDisplayMode.Hierarchical
VerticalScrollBarVisibility Returns a value that indicates when the vertical scrollbar should be shown in this view. System.Windows.Controls.ScrollBarVisibility.Hidden

Refer to the Carousel Architecture Overview topic in the Developer's Guide for an explanation of how Carousel presentation works.

Example
The following example demonstrates how to create a CarouselView for the View property of the XamDataPresenter and initialize its ViewSettings.
<igDP:XamDataPresenter x:Name="XamDataPresenter1" BindToSampleData="True">
    
<igDP:XamDataPresenter.Resources>
        
<Path Visibility="Hidden" 
                
Fill="{x:Null}" 
                
Stretch="Fill" 
                
Stroke="#FF000000" 
                
x:Key="ovalPath" 
                
Data="M230,239 C230,239 254.00029,48.999465 420.00029,47.999465 586.00029,46.999465 629.00026,157.00004 618.00026,276.00004 607.00026,395.00004 538.91118,531.32446 425.00013,523.00028 164.99995,504.00048 189.99998,154.99988 189.99998,154.99988" 
                
Opacity="0.5" 
                
Margin="0,0,0,0"/>
    
</igDP:XamDataPresenter.Resources>

    
<igDP:XamDataPresenter.View>
        
<igDP:CarouselView>
            
<igDP:CarouselView.ViewSettings>
                
<igWindows:CarouselViewSettings IsListContinuous="True" 
                        
ItemPath="{Binding ElementName=ovalPath, Mode=OneWay}" 
                        
ItemPathAutoPad="False" 
                        
ItemPathPadding="251,50,260,170" 
                        
ItemSize="200,200" 
                        
ItemPathHorizontalAlignment="Stretch" 
                        
ItemPathVerticalAlignment="Stretch" 
                        
ItemsPerPage="6" 
                        
UseOpacity="True" 
                        
UseZOrder="True" >

                    
<igWindows:CarouselViewSettings.ScalingEffectStops>
                        
<igWindows:ScalingEffectStopCollection>
                            
<igWindows:ScalingEffectStop Value="0.3"/>
                            
<igWindows:ScalingEffectStop Offset="0.35" Value="0.7"/>
                            
<igWindows:ScalingEffectStop Offset="0.44" Value="1.5"/>
                            
<igWindows:ScalingEffectStop Offset="0.6" Value="0.4"/>
                            
<igWindows:ScalingEffectStop Offset="0.8" Value="0.3"/>
                            
<igWindows:ScalingEffectStop Offset="1"/>
                        
</igWindows:ScalingEffectStopCollection>
                    
</igWindows:CarouselViewSettings.ScalingEffectStops>

                    
<igWindows:CarouselViewSettings.OpacityEffectStops>
                        
<igWindows:OpacityEffectStopCollection>
                            
<igWindows:OpacityEffectStop/>
                            
<igWindows:OpacityEffectStop Offset="0.35" Value="0.5"/>
                            
<igWindows:OpacityEffectStop Offset="0.44" Value="1"/>
                            
<igWindows:OpacityEffectStop Offset="0.6" Value="0.5"/>
                            
<igWindows:OpacityEffectStop Offset="0.8" Value="0.2"/>
                            
<igWindows:OpacityEffectStop Offset="1"/>
                        
</igWindows:OpacityEffectStopCollection>
                    
</igWindows:CarouselViewSettings.OpacityEffectStops>

                    
<igWindows:CarouselViewSettings.ZOrderEffectStops>
                        
<igWindows:ZOrderEffectStopCollection>
                            
<igWindows:ZOrderEffectStop/>
                            
<igWindows:ZOrderEffectStop Offset="0.4" Value="1"/>
                            
<igWindows:ZOrderEffectStop Offset="1"/>
                        
</igWindows:ZOrderEffectStopCollection>
                    
</igWindows:CarouselViewSettings.ZOrderEffectStops>

                
</igWindows:CarouselViewSettings>

            
</igDP:CarouselView.ViewSettings>
        
</igDP:CarouselView>
    
</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