OrientedVirtualizingPanel OrientedVirtualizingPanel OrientedVirtualizingPanel Class

Adds infrastructure (provides base class) for virtualizing layout containers that support spatial cues, such as VirtualizingStackPanel and WrapGrid.

Syntax

Declaration

public class OrientedVirtualizingPanelpublic class OrientedVirtualizingPanelPublic Class OrientedVirtualizingPanel

Inheritance Hierarchy

Inherited Members

Inherited properties

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

Inherited events

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Inherited methods

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Remarks

OrientedVirtualizingPanel derived classes

OrientedVirtualizingPanel is the parent class for VirtualizingStackPanel and WrapGrid.

Properties summary

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

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

Gets or sets a value that determines how the OrientedVirtualizingPanel measures space for child elements for possible scrolling in the horizontal dimension.

Gets or sets a value that determines how the OrientedVirtualizingPanel measures space for child elements for possible scrolling in the vertical dimension.

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 OrientedVirtualizingPanel.

Gets the vertical offset of the scrolled content.

Gets the vertical size of the viewport or content area.

Gets the horizontal size of the viewport or content area.

Methods summary

Returns the index values of the items that the specified point is between.

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 toward the bottom.

Scrolls content by one line toward the left.

Scrolls content by one line toward the right.

Scrolls content by one line toward the top.

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

Scrolls content by one mouse-wheel click toward the bottom.

Scrolls content by one mouse-wheel click toward the left.

Scrolls content by one mouse-wheel click toward the right.

Scrolls content by one mouse-wheel click toward the top.

Scrolls content by one page toward the bottom.

Scrolls content by one page toward the left.

Scrolls content by one page toward the right.

Scrolls content by one page toward the top.

Changes the horizontal offset of content within the OrientedVirtualizingPanel viewport.

Changes the vertical offset of content within the OrientedVirtualizingPanel viewport.

Events summary

Fires when the measurements for horizontal snap points change.

Fires when the measurements for vertical snap points change.

Properties

  • AreHorizontalSnapPointsRegular
    AreHorizontalSnapPointsRegular
    AreHorizontalSnapPointsRegular
    AreHorizontalSnapPointsRegular

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

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

    Property Value

    • bool
      bool
      bool

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

  • AreVerticalSnapPointsRegular
    AreVerticalSnapPointsRegular
    AreVerticalSnapPointsRegular
    AreVerticalSnapPointsRegular

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

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

    Property Value

    • bool
      bool
      bool

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

  • CanHorizontallyScroll
    CanHorizontallyScroll
    CanHorizontallyScroll
    CanHorizontallyScroll

    Gets or sets a value that determines how the OrientedVirtualizingPanel measures space for child elements for possible scrolling in the horizontal dimension.

    public bool CanHorizontallyScroll { get; set; }public bool CanHorizontallyScroll { get; set; }Public ReadWrite Property CanHorizontallyScroll As boolpublic bool CanHorizontallyScroll { get; set; }

    Property Value

    • bool
      bool
      bool

      true to support a potentially infinite horizontal layout dimension. false to restrict to available size.

    Remarks

    Note

    This property is not intended to be set in XAML. You can set the panel's Orientation property in XAML and optionally change the HorizontalScrollBarVisibility or VerticalScrollBarVisibility to change how scrolling works. This property can be changed in code. In some cases you will need to use VisualTreeHelper to access the panel.

  • CanVerticallyScroll
    CanVerticallyScroll
    CanVerticallyScroll
    CanVerticallyScroll

    Gets or sets a value that determines how the OrientedVirtualizingPanel measures space for child elements for possible scrolling in the vertical dimension.

    public bool CanVerticallyScroll { get; set; }public bool CanVerticallyScroll { get; set; }Public ReadWrite Property CanVerticallyScroll As boolpublic bool CanVerticallyScroll { get; set; }

    Property Value

    • bool
      bool
      bool

      true to support a potentially infinite vertical layout dimension. false to restrict to available size.

    Remarks

    Note

    This property is not intended to be set inXAML. You can set the panel's Orientation property in XAML and optionally change the HorizontalScrollBarVisibility or VerticalScrollBarVisibility to change how scrolling works. This property can be changed in code. In some cases you will need to use VisualTreeHelper to access the panel.

  • 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 doublepublic double ExtentHeight { get; }

    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 doublepublic double ExtentWidth { get; }

    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 doublepublic double HorizontalOffset { get; }

    Property Value

    • double
      double
      double

      A value in pixels.

    Remarks

    To change the horizontal offset, call SetHorizontalOffset(Double).

  • 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 OrientedVirtualizingPanel.

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

    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 doublepublic double VerticalOffset { get; }

    Property Value

    • double
      double
      double

      A value in pixels.

    Remarks

    To change the vertical offset, call SetVerticalOffset(Double).

  • ViewportHeight
    ViewportHeight
    ViewportHeight
    ViewportHeight

    Gets the vertical size of the viewport or content area.

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

    Property Value

    • double
      double
      double

      A value in pixels.

  • ViewportWidth
    ViewportWidth
    ViewportWidth
    ViewportWidth

    Gets the horizontal size of the viewport or content area.

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

    Property Value

    • double
      double
      double

      A value in pixels.

Methods

  • GetInsertionIndexes(Point, Int32, Int32)
    GetInsertionIndexes(Point, Int32, Int32)
    GetInsertionIndexes(Point, Int32, Int32)
    GetInsertionIndexes(Point, Int32, Int32)

    Returns the index values of the items that the specified point is between.

    public void GetInsertionIndexes(Point position, Int32 first, Int32 second)public void GetInsertionIndexes(Point position, Int32 first, Int32 second)Public Function GetInsertionIndexes(position As Point, first As Int32, second As Int32) As voidpublic void GetInsertionIndexes(Point position, Int32 first, Int32 second)

    Parameters

    • position

      The point for which to get insertion indexes.

    • first
      System.Int32
      System.Int32
      System.Int32

      The index of the item before the specified point.

    • second
      System.Int32
      System.Int32
      System.Int32

      The index of the item after the specified point.

    Remarks

    Available starting in Windows 10, version 1607.

    Call this method when handling a DragOver event to return the indices of the two items between which the DragOver is happening and where a potential drop and insertion would happen.

  • 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 IVectorView<float> GetIrregularSnapPoints(Orientation orientation, SnapPointsAlignment alignment)Public Function GetIrregularSnapPoints(orientation As Orientation, alignment As SnapPointsAlignment) As IVectorView( Of float )public IVectorView<float> GetIrregularSnapPoints(Orientation orientation, SnapPointsAlignment alignment)

    Parameters

    Returns

    • 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, Single offset)public float GetRegularSnapPoints(Orientation orientation, SnapPointsAlignment alignment, Single offset)Public Function GetRegularSnapPoints(orientation As Orientation, alignment As SnapPointsAlignment, offset As Single) As floatpublic float GetRegularSnapPoints(Orientation orientation, SnapPointsAlignment alignment, Single offset)

    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 toward the bottom.

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

    Remarks

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

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

    Scrolls content by one line toward the left.

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

    Remarks

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

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

    Scrolls content by one line toward the right.

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

    Remarks

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

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

    Scrolls content by one line toward the top.

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

    Remarks

    This implementation calls SetVerticalOffset(Double) using a value for "line" of 16 pixels, which 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 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 Rectpublic Rect MakeVisible(UIElement visual, Rect rectangle)

    Parameters

    Returns

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

    Scrolls content by one mouse-wheel click toward the bottom.

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

    Remarks

    This implementation calls SetVerticalOffset(Double) using a default value for "mouse-wheel click" of 48 pixels (3 lines), which comes from a default ScrollViewer.

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

    Scrolls content by one mouse-wheel click toward the left.

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

    Remarks

    This calls SetHorizontalOffset(Double) using a default value for "mouse-wheel click" of 48 pixels (3 lines), which comes from a default ScrollViewer.

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

    Scrolls content by one mouse-wheel click toward the right.

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

    Remarks

    This implementation calls SetHorizontalOffset(Double) using a default value for "mouse-wheel click" of 48 pixels (3 lines), which comes from a default ScrollViewer.

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

    Scrolls content by one mouse-wheel click toward the top.

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

    Remarks

    This implementation calls SetVerticalOffset(Double) using a default value for "mouse-wheel click" of 48 pixels (3 lines), which comes from a default ScrollViewer.

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

    Scrolls content by one page toward the bottom.

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

    Remarks

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

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

    Scrolls content by one page toward the left.

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

    Remarks

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

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

    Scrolls content by one page toward the right.

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

    Remarks

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

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

    Scrolls content by one page toward the top.

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

    Remarks

    This implementation calls SetVerticalOffset(Double) 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 OrientedVirtualizingPanel viewport.

    public void SetHorizontalOffset(Double offset)public void SetHorizontalOffset(Double offset)Public Function SetHorizontalOffset(offset As Double) As voidpublic void SetHorizontalOffset(Double offset)

    Parameters

    • offset
      System.Double
      System.Double
      System.Double

      The horizontal offset to set, in pixels.

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

    Changes the vertical offset of content within the OrientedVirtualizingPanel viewport.

    public void SetVerticalOffset(Double offset)public void SetVerticalOffset(Double offset)Public Function SetVerticalOffset(offset As Double) As voidpublic void SetVerticalOffset(Double offset)

    Parameters

    • offset
      System.Double
      System.Double
      System.Double

      The offset to set, in pixels.

Events

  • HorizontalSnapPointsChanged
    HorizontalSnapPointsChanged
    HorizontalSnapPointsChanged
    HorizontalSnapPointsChanged

    Fires when the measurements for horizontal snap points change.

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

    Fires when the measurements for vertical snap points change.

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

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

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

Details

Assembly

Windows.UI.Xaml.Controls.Primitives.dll