ScrollViewer.UnregisterAnchorCandidate(UIElement) ScrollViewer.UnregisterAnchorCandidate(UIElement) ScrollViewer.UnregisterAnchorCandidate(UIElement) ScrollViewer.UnregisterAnchorCandidate(UIElement) Method

Definition

Unregisters a UIElement as a potential scroll anchor.

public : void UnregisterAnchorCandidate(UIElement element)
void UnregisterAnchorCandidate(UIElement element) const;
public void UnregisterAnchorCandidate(UIElement element)
Public Sub UnregisterAnchorCandidate(element As UIElement)

Parameters

element
UIElement UIElement

A UIElement within the subtree of the ScrollViewer.

Additional features and requirements

Device family
Windows 10, version 1809 (introduced v10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v7)

Remarks

When an element's CanBeScrollAnchor property changes to false (or the element is removed from the visual tree), the framework locates the first IScrollAnchorProvider in that element's chain of ancestors and automatically calls its UnregisterAnchorCandidate method.

See also

  • T:Windows.UI.Xaml.Controls.IScrollAnchorProvider * M:Windows.UI.Xaml.Controls.IScrollAnchorProvider.RegisterAnchorCandidate(Windows.UI.Xaml.UIElement) * P:Windows.UI.Xaml.UIElement.CanBeScrollAnchor