ListViewBase.ScrollIntoView Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
ScrollIntoView(Object, ScrollIntoViewAlignment) |
Scrolls the list to bring the specified data item into view with the specified alignment. |
ScrollIntoView(Object) |
Scrolls the list to bring the specified data item into view. |
Scrolls the list to bring the specified data item into view with the specified alignment.
public:
virtual void ScrollIntoView(Platform::Object ^ item, ScrollIntoViewAlignment alignment) = ScrollIntoView;
/// [Windows.Foundation.Metadata.Overload("ScrollIntoViewWithAlignment")]
void ScrollIntoView(IInspectable const& item, ScrollIntoViewAlignment const& alignment);
[Windows.Foundation.Metadata.Overload("ScrollIntoViewWithAlignment")]
public void ScrollIntoView(object item, ScrollIntoViewAlignment alignment);
function scrollIntoView(item, alignment)
Public Sub ScrollIntoView (item As Object, alignment As ScrollIntoViewAlignment)
Parameters
- item
-
Object
Platform::Object
IInspectable
The data item to bring into view.
- alignment
- ScrollIntoViewAlignment
An enumeration value that specifies whether the item uses Default or Leading alignment.
- Attributes
Examples
You can find a full sample focusing around how to use ScrollIntoView here.
Remarks
You use the ScrollIntoView method to bring an item into view when the ListViewBase control is not used as a view in a SemanticZoom control. To bring an item into view when the ListViewBase control is used in a SemanticZoom, use the MakeVisible method instead.
When the contents of the ItemsSource collection changes, particularly if many items are added to or removed from the collection, you might need to call UpdateLayout prior to calling ScrollIntoView for the specified item to scroll into the viewport.
See also
Applies to
WinRT Build 26100 and other versions
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |
Scrolls the list to bring the specified data item into view.
public:
virtual void ScrollIntoView(Platform::Object ^ item) = ScrollIntoView;
/// [Windows.Foundation.Metadata.Overload("ScrollIntoView")]
void ScrollIntoView(IInspectable const& item);
[Windows.Foundation.Metadata.Overload("ScrollIntoView")]
public void ScrollIntoView(object item);
function scrollIntoView(item)
Public Sub ScrollIntoView (item As Object)
Parameters
- item
-
Object
Platform::Object
IInspectable
The data item to bring into view.
- Attributes
Remarks
You use the ScrollIntoView method to bring an item into view when the ListViewBase control is not used as a view in a SemanticZoom control. To bring an item into view when the ListViewBase control is used in a SemanticZoom, use the MakeVisible method instead.
When the contents of the ItemsSource collection changes, particularly if many items are added to or removed from the collection, you might need to call UpdateLayout prior to calling ScrollIntoView for the specified item to scroll into the viewport.
See also
Applies to
WinRT Build 26100 and other versions
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |