CarouselPanel CarouselPanel CarouselPanel CarouselPanel Class

Definition

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

public : class CarouselPanel : VirtualizingPanel, ICarouselPanel, IScrollSnapPointsInfopublic class CarouselPanel : VirtualizingPanel, ICarouselPanel, IScrollSnapPointsInfoPublic Class CarouselPanel Inherits VirtualizingPanel Implements ICarouselPanel, IScrollSnapPointsInfo// This API is not available in Javascript.
<!--somewhere within items panel templates-->
<CarouselPanel .../>
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited properties

Inherited events

Inherited methods

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

CarouselPanel() CarouselPanel() CarouselPanel() CarouselPanel()

Initializes a new instance of the CarouselPanel class.

public : CarouselPanel()public CarouselPanel()Public Sub New()// This API is not available in Javascript.

Properties

AreHorizontalSnapPointsRegular AreHorizontalSnapPointsRegular AreHorizontalSnapPointsRegular AreHorizontalSnapPointsRegular

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

public : PlatForm::Boolean AreHorizontalSnapPointsRegular { get; }public bool AreHorizontalSnapPointsRegular { get; }Public ReadOnly Property AreHorizontalSnapPointsRegular As bool// This API is not available in Javascript.
Value
PlatForm::Boolean 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 : PlatForm::Boolean AreVerticalSnapPointsRegular { get; }public bool AreVerticalSnapPointsRegular { get; }Public ReadOnly Property AreVerticalSnapPointsRegular As bool// This API is not available in Javascript.
Value
PlatForm::Boolean 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 : PlatForm::Boolean CanHorizontallyScroll { get; set; }public bool CanHorizontallyScroll { get; set; }Public ReadWrite Property CanHorizontallyScroll As bool// This API is not available in Javascript.
<CarouselPanel CanHorizontallyScroll="bool" />
Value
PlatForm::Boolean 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 : PlatForm::Boolean CanVerticallyScroll { get; set; }public bool CanVerticallyScroll { get; set; }Public ReadWrite Property CanVerticallyScroll As bool// This API is not available in Javascript.
<CarouselPanel CanVerticallyScroll="bool" />
Value
PlatForm::Boolean 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// This API is not available in Javascript.
Value
double 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// This API is not available in Javascript.
Value
double 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// This API is not available in Javascript.
Value
double 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 : PlatForm::Object ScrollOwner { get; set; }public object ScrollOwner { get; set; }Public ReadWrite Property ScrollOwner As object// This API is not available in Javascript.
Value
PlatForm::Object 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// This API is not available in Javascript.
Value
double 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// This API is not available in Javascript.
Value
double 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// This API is not available in Javascript.
Value
double double double double

A value in pixels.

Methods

GetIrregularSnapPoints(Orientation, SnapPointsAlignment) GetIrregularSnapPoints(Orientation, SnapPointsAlignment) GetIrregularSnapPoints(Orientation, SnapPointsAlignment) GetIrregularSnapPoints(Orientation, SnapPointsAlignment)

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

public : IVectorView<float> GetIrregularSnapPoints(Orientation orientation, SnapPointsAlignment alignment)public IReadOnlyList<float> GetIrregularSnapPoints(Orientation orientation, SnapPointsAlignment alignment)Public Function GetIrregularSnapPoints(orientation As Orientation, alignment As SnapPointsAlignment) As IReadOnlyList( Of float )// This API is not available in Javascript.
Parameters
orientation
Orientation Orientation Orientation Orientation

The orientation/dimension for the desired snap point set.

alignment
SnapPointsAlignment SnapPointsAlignment SnapPointsAlignment SnapPointsAlignment

The alignment to use when applying the snap points.

Returns
IVectorView<float> IReadOnlyList<float> IReadOnlyList<float> IReadOnlyList<float>

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

GetRegularSnapPoints(Orientation, SnapPointsAlignment, Single) GetRegularSnapPoints(Orientation, SnapPointsAlignment, Single) GetRegularSnapPoints(Orientation, SnapPointsAlignment, Single) GetRegularSnapPoints(Orientation, SnapPointsAlignment, Single)

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

public : float GetRegularSnapPoints(Orientation orientation, SnapPointsAlignment alignment, float offset)public float GetRegularSnapPoints(Orientation orientation, SnapPointsAlignment alignment, Single offset)Public Function GetRegularSnapPoints(orientation As Orientation, alignment As SnapPointsAlignment, offset As Single) As float// This API is not available in Javascript.
Parameters
orientation
Orientation Orientation Orientation Orientation

The orientation/dimension for the desired snap point set.

alignment
SnapPointsAlignment SnapPointsAlignment SnapPointsAlignment SnapPointsAlignment

The alignment to use when applying the snap points.

offset
float Single Single Single

Out parameter. The offset of the first snap point.

Returns
float 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// This API is not available in Javascript.

Remarks

This implementation calls SetVerticalOffset 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// This API is not available in Javascript.

Remarks

This implementation calls SetHorizontalOffset 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// This API is not available in Javascript.

Remarks

This implementation calls SetHorizontalOffset 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// This API is not available in Javascript.

Remarks

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

MakeVisible(UIElement, Rect) MakeVisible(UIElement, Rect) MakeVisible(UIElement, Rect) MakeVisible(UIElement, 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(UIElement visual, Rect rectangle)public Rect MakeVisible(UIElement visual, Rect rectangle)Public Function MakeVisible(visual As UIElement, rectangle As Rect) As Rect// This API is not available in Javascript.
Parameters
visual
UIElement UIElement UIElement UIElement

The element to make visible.

rectangle
Rect Rect Rect Rect

A rectangle representing the element's coordinate space.

Returns

A rectangle that represents the input rectangle Rect transformed by using the CarouselPanel coordinate space.

MouseWheelDown() MouseWheelDown() MouseWheelDown() MouseWheelDown()

Scrolls content by one mousewheel click towards the bottom.

public : void MouseWheelDown()public void MouseWheelDown()Public Function MouseWheelDown() As void// This API is not available in Javascript.

Remarks

This implementation calls SetVerticalOffset 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// This API is not available in Javascript.

Remarks

This implementation calls SetHorizontalOffset 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// This API is not available in Javascript.

Remarks

This implementation calls SetHorizontalOffset 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// This API is not available in Javascript.

Remarks

This implementation calls SetVerticalOffset 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// This API is not available in Javascript.

Remarks

This implementation calls SetVerticalOffset 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// This API is not available in Javascript.

Remarks

This implementation calls SetHorizontalOffset 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// This API is not available in Javascript.

Remarks

This implementation calls SetHorizontalOffset 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// This API is not available in Javascript.

Remarks

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

SetHorizontalOffset(Double) SetHorizontalOffset(Double) SetHorizontalOffset(Double) SetHorizontalOffset(Double)

Changes the horizontal offset of content within the CarouselPanel viewport.

public : void SetHorizontalOffset(double offset)public void SetHorizontalOffset(Double offset)Public Function SetHorizontalOffset(offset As Double) As void// This API is not available in Javascript.
Parameters
offset
double Double Double Double

The horizontal offset to set, in pixels.

SetVerticalOffset(Double) SetVerticalOffset(Double) SetVerticalOffset(Double) SetVerticalOffset(Double)

Changes the vertical offset of content within the CarouselPanel viewport.

public : void SetVerticalOffset(double offset)public void SetVerticalOffset(Double offset)Public Function SetVerticalOffset(offset As Double) As void// This API is not available in Javascript.
Parameters
offset
double Double Double 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 HorizontalSnapPointsChanged<object>public event EventHandler HorizontalSnapPointsChanged<object>Public Event HorizontalSnapPointsChanged<object>// This API is not available in Javascript.
<CarouselPanel HorizontalSnapPointsChanged="eventhandler"/>

VerticalSnapPointsChanged VerticalSnapPointsChanged VerticalSnapPointsChanged VerticalSnapPointsChanged

Occurs when the measurements for vertical snap points change.

public : event EventHandler VerticalSnapPointsChanged<object>public event EventHandler VerticalSnapPointsChanged<object>Public Event VerticalSnapPointsChanged<object>// This API is not available in Javascript.
<CarouselPanel VerticalSnapPointsChanged="eventhandler"/>

See Also