IScrollAnchorProvider.RegisterAnchorCandidate(UIElement) 方法

定義

UIElement 註冊為可能的捲動錨點候選專案。

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

參數

element
UIElement

IScrollAnchorProvider 子樹狀結構內的UIElement

備註

當元素的 CanBeScrollAnchor 設為 true 時,架構會在該元素的上階鏈結中找出第一個 IScrollAnchorProvider ,並自動呼叫其 RegisterAnchorCandidate 方法。 當在現有元素上設定 屬性,或已設定屬性的即時樹狀結構中加入專案時,就會發生此情況。

同樣地,當屬性設定為 false (或從可視化樹狀結構中移除元素,並將屬性設定為 true) 時,架構會在第一個 IScrollAnchorProvider 上呼叫 UnregisterAnchorCandidate

適用於

另請參閱