CarouselPanel CarouselPanel CarouselPanel Class

Represents a panel that arranges its items in a line and circles around to the first item when the last item is reached.

Syntax

Declaration

public class CarouselPanelpublic class CarouselPanelPublic Class CarouselPanel
<!--somewhere within items panel templates-->
<CarouselPanel .../>

Inheritance Hierarchy

Inherited Members

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Tag
Tag
Tag
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Remarks

Note

CarouselPanel can't be used as a stand-alone control, it can only be used as the ItemsPanel of an ItemsControl. It's the default ItemsPanel for the ComboBox control, and is not supported for use with any other ItemsControl.

Constructors summary

Initializes a new instance of the CarouselPanel class.

Properties summary

Gets a value that indicates whether the horizontal snap points for the CarouselPanel are equidistant from each other.

Gets a value that indicates whether the vertical snap points for the CarouselPanel are equidistant from each other.

Not intended for general use. Gets or sets a value that indicates whether scrolling on the horizontal axis is possible.

Not intended for general use. Gets or sets a value that indicates whether scrolling on the vertical axis is possible.

Gets the vertical size of the panel extent.

Gets the horizontal size of the panel extent.

Gets the horizontal offset of the scrolled content.

Gets or sets a reference to a ScrollViewer that is the scroll host or scroll owner for scrolling behavior of the CarouselPanel.

Gets the vertical offset of the scrolled content.

Gets the vertical size of the viewport/content area.

Gets the horizontal size of the viewport/content area.

Methods summary

Returns the set of distances between irregular snap points for a specified orientation and alignment.

Gets the distance between regular snap points for a specified orientation and alignment.

Scrolls content by one line towards the bottom.

Scrolls content by one line towards the left.

Scrolls content by one line towards the right.

Scrolls content by one line towards the top.

Changes existing offsets in order to make the provided element visible in the viewport, and returns a Rect measurement and position of the area.

Scrolls content by one mousewheel click towards the bottom.

Scrolls content by one mousewheel click towards the left.

Scrolls content by one mousewheel click towards the right.

Scrolls content by one mousewheel click towards the top.

Scrolls content by one page towards the bottom.

Scrolls content by one page towards the left.

Scrolls content by one page towards the left.

Scrolls content by one page towards the top.

Changes the horizontal offset of content within the CarouselPanel viewport.

Changes the vertical offset of content within the CarouselPanel viewport.

Events summary

Occurs when the measurements for horizontal snap points change.

Occurs when the measurements for vertical snap points change.

Constructors

  • CarouselPanel()
    CarouselPanel()
    CarouselPanel()
    CarouselPanel()

    Initializes a new instance of the CarouselPanel class.

    public CarouselPanel()public CarouselPanel()Public Function CarouselPanel() As

Properties

  • AreHorizontalSnapPointsRegular
    AreHorizontalSnapPointsRegular
    AreHorizontalSnapPointsRegular
    AreHorizontalSnapPointsRegular

    Gets a value that indicates whether the horizontal snap points for the CarouselPanel are equidistant from each other.

    public bool AreHorizontalSnapPointsRegular { get; }public bool AreHorizontalSnapPointsRegular { get; }Public ReadOnly Property AreHorizontalSnapPointsRegular As bool

    Property Value

    • bool
      bool
      bool

      true if the horizontal snap points for the CarouselPanel are equidistant from each other; otherwise, false.

  • AreVerticalSnapPointsRegular
    AreVerticalSnapPointsRegular
    AreVerticalSnapPointsRegular
    AreVerticalSnapPointsRegular

    Gets a value that indicates whether the vertical snap points for the CarouselPanel are equidistant from each other.

    public bool AreVerticalSnapPointsRegular { get; }public bool AreVerticalSnapPointsRegular { get; }Public ReadOnly Property AreVerticalSnapPointsRegular As bool

    Property Value

    • bool
      bool
      bool

      true if the vertical snap points for the CarouselPanel are equidistant from each other; otherwise, false.

  • CanHorizontallyScroll
    CanHorizontallyScroll
    CanHorizontallyScroll
    CanHorizontallyScroll

    Not intended for general use. Gets or sets a value that indicates whether scrolling on the horizontal axis is possible.

    public bool CanHorizontallyScroll { get; set; }public bool CanHorizontallyScroll { get; set; }Public ReadWrite Property CanHorizontallyScroll As bool
    <CarouselPanel CanHorizontallyScroll="bool" />
    

    Property Value

    • bool
      bool
      bool

      true if scrolling is possible; otherwise, false.

    Remarks

    Note

    This property is not intended for use in your code.

  • CanVerticallyScroll
    CanVerticallyScroll
    CanVerticallyScroll
    CanVerticallyScroll

    Not intended for general use. Gets or sets a value that indicates whether scrolling on the vertical axis is possible.

    public bool CanVerticallyScroll { get; set; }public bool CanVerticallyScroll { get; set; }Public ReadWrite Property CanVerticallyScroll As bool
    <CarouselPanel CanVerticallyScroll="bool" />
    

    Property Value

    • bool
      bool
      bool

      true if scrolling is possible; otherwise, false.

    Remarks

    Note

    This property is not intended for use in your code.

  • ExtentHeight
    ExtentHeight
    ExtentHeight
    ExtentHeight

    Gets the vertical size of the panel extent.

    public double ExtentHeight { get; }public double ExtentHeight { get; }Public ReadOnly Property ExtentHeight As double

    Property Value

    • double
      double
      double

      A value in pixels.

  • ExtentWidth
    ExtentWidth
    ExtentWidth
    ExtentWidth

    Gets the horizontal size of the panel extent.

    public double ExtentWidth { get; }public double ExtentWidth { get; }Public ReadOnly Property ExtentWidth As double

    Property Value

    • double
      double
      double

      A value in pixels.

  • HorizontalOffset
    HorizontalOffset
    HorizontalOffset
    HorizontalOffset

    Gets the horizontal offset of the scrolled content.

    public double HorizontalOffset { get; }public double HorizontalOffset { get; }Public ReadOnly Property HorizontalOffset As double

    Property Value

    • double
      double
      double

      A value in pixels.

  • ScrollOwner
    ScrollOwner
    ScrollOwner
    ScrollOwner

    Gets or sets a reference to a ScrollViewer that is the scroll host or scroll owner for scrolling behavior of the CarouselPanel.

    public object ScrollOwner { get; set; }public object ScrollOwner { get; set; }Public ReadWrite Property ScrollOwner As object

    Property Value

    • object
      object
      object

      The scroll host or scroll owner for scrolling behavior.

  • VerticalOffset
    VerticalOffset
    VerticalOffset
    VerticalOffset

    Gets the vertical offset of the scrolled content.

    public double VerticalOffset { get; }public double VerticalOffset { get; }Public ReadOnly Property VerticalOffset As double

    Property Value

    • double
      double
      double

      A value in pixels.

  • ViewportHeight
    ViewportHeight
    ViewportHeight
    ViewportHeight

    Gets the vertical size of the viewport/content area.

    public double ViewportHeight { get; }public double ViewportHeight { get; }Public ReadOnly Property ViewportHeight As double

    Property Value

    • double
      double
      double

      A value in pixels.

  • ViewportWidth
    ViewportWidth
    ViewportWidth
    ViewportWidth

    Gets the horizontal size of the viewport/content area.

    public double ViewportWidth { get; }public double ViewportWidth { get; }Public ReadOnly Property ViewportWidth As double

    Property Value

    • double
      double
      double

      A value in pixels.

Methods

  • GetIrregularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment)
    GetIrregularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment)
    GetIrregularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment)
    GetIrregularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment)

    Returns the set of distances between irregular snap points for a specified orientation and alignment.

    public IVectorView<float> GetIrregularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment)public IVectorView<float> GetIrregularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment)Public Function GetIrregularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment) As IVectorView( Of float )

    Parameters

    Returns

    • The read only collection of snap point distances. Returns an empty collection when no snap points are present.

  • GetRegularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment,System.Single)
    GetRegularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment,System.Single)
    GetRegularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment,System.Single)
    GetRegularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment,System.Single)

    Gets the distance between regular snap points for a specified orientation and alignment.

    public float GetRegularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment,System.Single)public float GetRegularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment,System.Single)Public Function GetRegularSnapPoints(Windows.UI.Xaml.Controls.Orientation,Windows.UI.Xaml.Controls.Primitives.SnapPointsAlignment,System.Single) As float

    Parameters

    Returns

    • float
      float
      float

      The distance between the equidistant snap points. Returns 0 when no snap points are present.

  • LineDown()
    LineDown()
    LineDown()
    LineDown()

    Scrolls content by one line towards the bottom.

    public void LineDown()public void LineDown()Public Function LineDown() As void

    Remarks

    This implementation calls SetVerticalOffset(System.Double) using a value for "line" of 16 pixels that comes from a default ScrollViewer.

  • LineLeft()
    LineLeft()
    LineLeft()
    LineLeft()

    Scrolls content by one line towards the left.

    public void LineLeft()public void LineLeft()Public Function LineLeft() As void

    Remarks

    This implementation calls SetHorizontalOffset(System.Double) using a value for "line" of 16 pixels that comes from a default ScrollViewer.

  • LineRight()
    LineRight()
    LineRight()
    LineRight()

    Scrolls content by one line towards the right.

    public void LineRight()public void LineRight()Public Function LineRight() As void

    Remarks

    This implementation calls SetHorizontalOffset(System.Double) using a value for "line" of 16 pixels that comes from a default ScrollViewer.

  • LineUp()
    LineUp()
    LineUp()
    LineUp()

    Scrolls content by one line towards the top.

    public void LineUp()public void LineUp()Public Function LineUp() As void

    Remarks

    This implementation calls SetVerticalOffset(System.Double) using a value for "line" of 16 pixels that comes from a default ScrollViewer.

  • MakeVisible(Windows.UI.Xaml.UIElement,Windows.Foundation.Rect)
    MakeVisible(Windows.UI.Xaml.UIElement,Windows.Foundation.Rect)
    MakeVisible(Windows.UI.Xaml.UIElement,Windows.Foundation.Rect)
    MakeVisible(Windows.UI.Xaml.UIElement,Windows.Foundation.Rect)

    Changes existing offsets in order to make the provided element visible in the viewport, and returns a Rect measurement and position of the area.

    public Rect MakeVisible(Windows.UI.Xaml.UIElement,Windows.Foundation.Rect)public Rect MakeVisible(Windows.UI.Xaml.UIElement,Windows.Foundation.Rect)Public Function MakeVisible(Windows.UI.Xaml.UIElement,Windows.Foundation.Rect) As Rect

    Parameters

    Returns

  • MouseWheelDown()
    MouseWheelDown()
    MouseWheelDown()
    MouseWheelDown()

    Scrolls content by one mousewheel click towards the bottom.

    public void MouseWheelDown()public void MouseWheelDown()Public Function MouseWheelDown() As void

    Remarks

    This implementation calls SetVerticalOffset(System.Double) using a default value for "mousewheel click" of 48 pixels (3 lines) that comes from a default ScrollViewer.

  • MouseWheelLeft()
    MouseWheelLeft()
    MouseWheelLeft()
    MouseWheelLeft()

    Scrolls content by one mousewheel click towards the left.

    public void MouseWheelLeft()public void MouseWheelLeft()Public Function MouseWheelLeft() As void

    Remarks

    This implementation calls SetHorizontalOffset(System.Double) using a default value for "mousewheel click" of 48 pixels (3 lines) that comes from a default ScrollViewer.

  • MouseWheelRight()
    MouseWheelRight()
    MouseWheelRight()
    MouseWheelRight()

    Scrolls content by one mousewheel click towards the right.

    public void MouseWheelRight()public void MouseWheelRight()Public Function MouseWheelRight() As void

    Remarks

    This implementation calls SetHorizontalOffset(System.Double) using a default value for "mousewheel click" of 48 pixels (3 lines) that comes from a default ScrollViewer.

  • MouseWheelUp()
    MouseWheelUp()
    MouseWheelUp()
    MouseWheelUp()

    Scrolls content by one mousewheel click towards the top.

    public void MouseWheelUp()public void MouseWheelUp()Public Function MouseWheelUp() As void

    Remarks

    This implementation calls SetVerticalOffset(System.Double) using a default value for "mousewheel click" of 48 pixels (3 lines) that comes from a default ScrollViewer.

  • PageDown()
    PageDown()
    PageDown()
    PageDown()

    Scrolls content by one page towards the bottom.

    public void PageDown()public void PageDown()Public Function PageDown() As void

    Remarks

    This implementation calls SetVerticalOffset(System.Double) using a value for "page" that is same as the ViewportHeight.

  • PageLeft()
    PageLeft()
    PageLeft()
    PageLeft()

    Scrolls content by one page towards the left.

    public void PageLeft()public void PageLeft()Public Function PageLeft() As void

    Remarks

    This implementation calls SetHorizontalOffset(System.Double) using a value for "page" that is same as the ViewportWidth.

  • PageRight()
    PageRight()
    PageRight()
    PageRight()

    Scrolls content by one page towards the left.

    public void PageRight()public void PageRight()Public Function PageRight() As void

    Remarks

    This implementation calls SetHorizontalOffset(System.Double) using a value for "page" that is same as the ViewportWidth.

  • PageUp()
    PageUp()
    PageUp()
    PageUp()

    Scrolls content by one page towards the top.

    public void PageUp()public void PageUp()Public Function PageUp() As void

    Remarks

    This implementation calls SetVerticalOffset(System.Double) using a value for "page" that is same as the ViewportHeight.

  • SetHorizontalOffset(System.Double)
    SetHorizontalOffset(System.Double)
    SetHorizontalOffset(System.Double)
    SetHorizontalOffset(System.Double)

    Changes the horizontal offset of content within the CarouselPanel viewport.

    public void SetHorizontalOffset(System.Double)public void SetHorizontalOffset(System.Double)Public Function SetHorizontalOffset(System.Double) As void

    Parameters

    • offset
      System.Double
      System.Double
      System.Double

      The horizontal offset to set, in pixels.

  • SetVerticalOffset(System.Double)
    SetVerticalOffset(System.Double)
    SetVerticalOffset(System.Double)
    SetVerticalOffset(System.Double)

    Changes the vertical offset of content within the CarouselPanel viewport.

    public void SetVerticalOffset(System.Double)public void SetVerticalOffset(System.Double)Public Function SetVerticalOffset(System.Double) As void

    Parameters

    • offset
      System.Double
      System.Double
      System.Double

      The vertical offset to set, in pixels.

Events

  • HorizontalSnapPointsChanged
    HorizontalSnapPointsChanged
    HorizontalSnapPointsChanged
    HorizontalSnapPointsChanged

    Occurs when the measurements for horizontal snap points change.

    public event EventHandler HorizontalSnapPointsChangedpublic event EventHandler HorizontalSnapPointsChangedPublic Event HorizontalSnapPointsChanged
    <CarouselPanel HorizontalSnapPointsChanged="eventhandler"/>
    
  • VerticalSnapPointsChanged
    VerticalSnapPointsChanged
    VerticalSnapPointsChanged
    VerticalSnapPointsChanged

    Occurs when the measurements for vertical snap points change.

    public event EventHandler VerticalSnapPointsChangedpublic event EventHandler VerticalSnapPointsChangedPublic Event VerticalSnapPointsChanged
    <CarouselPanel VerticalSnapPointsChanged="eventhandler"/>
    

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ComposableAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Controls.Primitives.dll