Share via


ScrollViewer.RegisterAnchorCandidate(UIElement) Méthode

Définition

Inscrit un UIElement en tant qu’ancre de défilement potentielle.

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

Paramètres

element
UIElement

UiElement dans la sous-arborescence de ScrollViewer.

Implémente

Configuration requise pour Windows

Famille d’appareils
Windows 10, version 1809 (introduit dans 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduit dans v7.0)

Remarques

Quand CanBeScrollAnchor a la valeur true d’un élément, l’infrastructure localise le premier IScrollAnchorProvider dans la chaîne d’ancêtres de cet élément et appelle automatiquement sa méthode RegisterAnchorCandidate. Cela se produit à la fois lorsque la propriété est définie sur un élément existant ou qu’un élément est ajouté à l’arborescence dynamique avec la propriété déjà définie.

De même, lorsque la propriété a la valeur false (ou qu’un élément est supprimé de l’arborescence visuelle avec la propriété définie sur true), l’infrastructure appelle le unregisterAnchorCandidate sur le premier IScrollAnchorProvider.

S’applique à

Voir aussi