Version

AutoScaleItemContentsToFit Property (CarouselViewSettings)

Returns/sets whether the XamCarouselPanel should automatically scale the contents of each item to fit within the bounds of the Item. The default is False.
Syntax
'Declaration
 
Public Property AutoScaleItemContentsToFit As Boolean
public bool AutoScaleItemContentsToFit {get; set;}
Remarks

The bounds of the Item is determined by the ItemSize property. Note that while you can indirectly affect the size of the items by using ScalingEffectStops, scaling effects are applied to items at render time after the setting of this property has taken effect.

When the AutoScalItemContentsToFit property is set to false, scrollbars will be shown by default within the item if necessary (i.e., if the size of the contents is greater than the size of the item) to enable scrolling of the contents. For explicit control over whether scrollbars are displayed in this case, you can set the ItemHorizontalScrollBarVisibility and ItemVerticalScrollBarVisibility properties.

Example
The following sample demonstrates how the items can be scaled up to the specified ItemSize using the AutoScaleItemContentsToFit of the CarouselViewSettings.
<igWindows:XamCarouselPanel>
    
<igWindows:XamCarouselPanel.ViewSettings>
        
<igWindows:CarouselViewSettings 
                
AutoScaleItemContentsToFit="True" 
                
ItemSize="200,150"/>
    
</igWindows:XamCarouselPanel.ViewSettings>

    
<Ellipse Width="50" Height="50" Stroke="Black" Fill="Red" />
    
<Ellipse Width="100" Height="50" Stroke="Black" Fill="Green" />
    
<Polygon Points="0, 25, 25, 0, 75, 0, 100, 25, 75, 50, 25, 50" Stroke="Black" Fill="Yellow" />
    
<Rectangle Width="100" Height="50" Stroke="Black" Fill="Purple" />
    
<Polyline Points="0, 25, 25, 0, 50, 25, 25, 50, 0, 25" Stroke="SlateGray" StrokeThickness="2" Fill="Blue"/>
    
<Path Stroke="Black" Fill="Gray" Data="M 10,100 C 10,300 300,-200 300,100" />
</igWindows:XamCarouselPanel>
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