Version

ItemPathStretch Property

Returns/sets how the ItemPath is stretched within the item path area. The default is System.Windows.Media.Stretch.Fill
Syntax
'Declaration
 
Public Property ItemPathStretch As Stretch
public Stretch ItemPathStretch {get; set;}
Remarks

The item path area is an area within the XamCarouselPanel that is defined by applying the ItemPathPadding to the bounds of the XamCarouselPanel.

The System.Windows.Media.Stretch enumeration values are interpreted as follows:

  • None - The item path preserves its original size.
  • Fill - The item path is resized to fill the destination dimensions. The aspect ratio is not preserved.
  • Uniform - The item path is resized to fit in the destination dimensions while it preserves its native aspect ratio.
  • UniformToFill - The item path is resized to fill the destination dimensions while it preserves its native aspect ratio. If the aspect ratio of the destination rectangle differs from the source, the item path is clipped to fit in the destination dimensions.

Example
In this example, the ItemPathStretch is changed to Uniform from its default value of Fill so that the aspect ratio of the path is preserved.
<igWindows:XamCarouselPanel>
    
<igWindows:XamCarouselPanel.ViewSettings>

        
<igWindows:CarouselViewSettings 
            
ItemPathStretch="Uniform" 
            
ItemPathRenderBrush="#77000000" />

    
</igWindows:XamCarouselPanel.ViewSettings>
</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