ContentElement.GetUIParentCore ContentElement.GetUIParentCore ContentElement.GetUIParentCore ContentElement.GetUIParentCore Method


當在衍生類別中覆寫時,如果沒有視覺化父項目存在,則會為這個項目傳回替代的使用者介面 (UI)user interface (UI) 父項目。When overridden in a derived class, returns an alternative 使用者介面 (UI)user interface (UI) parent for this element if no visual parent exists.

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


一個物件,如果衍生類別的實作有替代父代連接要報告。An object, if implementation of a derived class has an alternate parent connection to report.


預設虛擬實作這個方法會傳回nullThe default virtual implementation of this method returns null. FrameworkContentElement 提供實用的實作。FrameworkContentElement provides a practical implementation.

替代的父代是用於事件的路由,在其中項目會建立替代父結構,讓它的事件會路由傳送分離至標準的父代,則視覺樹狀結構路由傳送的標準模式的方式的情況下則會在向下預覽路由策略。Alternative parents are used for event routing, in cases where an element creates an alternative parent structure so that its events are routed in a way that diverges from the standard pattern of routing up the visual tree to the standard parent, or downward in the preview routing strategy.