Viewer. Register Anchor Candidate(UIElement) Method
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.
public: virtual void RegisterAnchorCandidate(UIElement ^ element) = RegisterAnchorCandidate;
void RegisterAnchorCandidate(UIElement const& element);
public void RegisterAnchorCandidate(UIElement element);
Public Sub RegisterAnchorCandidate (element As UIElement)
Windows 10, version 1809 (introduced in 10.0.17763.0)
Windows.Foundation.UniversalApiContract (introduced in v7.0)
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 the UnregisterAnchorCandidate on the first IScrollAnchorProvider.