UIElement.GetUIParentCore UIElement.GetUIParentCore UIElement.GetUIParentCore UIElement.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. FrameworkElement提供一个实际实现。FrameworkElement 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.

适用于