UIElement.GetUIParentCore 方法

定義

在衍生類別中覆寫時,如果沒有視覺父系存在,則會傳回替代的使用者介面 (UI) 父代。

protected public:
 virtual System::Windows::DependencyObject ^ GetUIParentCore();
protected internal virtual System.Windows.DependencyObject GetUIParentCore ();
abstract member GetUIParentCore : unit -> System.Windows.DependencyObject
override this.GetUIParentCore : unit -> System.Windows.DependencyObject
Protected Friend Overridable Function GetUIParentCore () As DependencyObject

傳回

DependencyObject

一個物件,如果衍生類別的實作有替代父代連接要報告。

備註

這個方法的預設虛擬實作會傳 null 回 。 FrameworkElement 提供實際的實作。

替代父代用於事件路由,在元素建立替代父結構的情況下,其事件會以從視覺化樹狀結構路由至標準父系的標準模式進行路由,或在預覽路由策略中向下移轉。

適用於