Udostępnij za pośrednictwem


ListBox.ScrollIntoView(Object) Method

Definition

Causes the object to scroll into view.

public:
 virtual void ScrollIntoView(Platform::Object ^ item) = ScrollIntoView;
void ScrollIntoView(IInspectable const& item);
public void ScrollIntoView(object item);
function scrollIntoView(item)
Public Sub ScrollIntoView (item As Object)

Parameters

item
Object

Platform::Object

IInspectable

The object to scroll to.

Remarks

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.

Applies to