Share via


IScrollAnchorProvider.RegisterAnchorCandidate(UIElement) Method

Definition

Registers a UIElement as a potential scroll anchor candidate.

public:
 void RegisterAnchorCandidate(UIElement ^ element);
void RegisterAnchorCandidate(UIElement const& element);
public void RegisterAnchorCandidate(UIElement element);
function registerAnchorCandidate(element)
Public Sub RegisterAnchorCandidate (element As UIElement)

Parameters

element
UIElement

A UIElement within the subtree of the IScrollAnchorProvider.

Remarks

When an element has CanBeScrollAnchor set to true the framework locates the first IScrollAnchorProvider in that element's chain of ancestors and automatically calls its RegisterAnchorCandidate method. This occurs both when the property is set on an existing element or an element is added to the live tree with the property already set.

Similarly, when the property is set to false (or an element is removed from the visual tree with the property set to true), the framework calls UnregisterAnchorCandidate on the first IScrollAnchorProvider.

Applies to

See also