UIElement.HitTestCore Method

Definition

实现 HitTestCore(GeometryHitTestParameters) 以提供基元素命中测试行为。Implements HitTestCore(GeometryHitTestParameters) to supply base element hit testing behavior.

Overloads

HitTestCore(GeometryHitTestParameters)

实现 HitTestCore(GeometryHitTestParameters) 以提供基元素命中测试行为(返回 GeometryHitTestResult)。Implements HitTestCore(GeometryHitTestParameters) to supply base element hit testing behavior (returning GeometryHitTestResult).

HitTestCore(PointHitTestParameters)

实现 HitTestCore(PointHitTestParameters) 以提供基元素命中测试行为(返回 HitTestResult)。Implements HitTestCore(PointHitTestParameters) to supply base element hit testing behavior (returning HitTestResult).

HitTestCore(GeometryHitTestParameters)

实现 HitTestCore(GeometryHitTestParameters) 以提供基元素命中测试行为(返回 GeometryHitTestResult)。Implements HitTestCore(GeometryHitTestParameters) to supply base element hit testing behavior (returning GeometryHitTestResult).

protected:
 override System::Windows::Media::GeometryHitTestResult ^ HitTestCore(System::Windows::Media::GeometryHitTestParameters ^ hitTestParameters);
protected override System.Windows.Media.GeometryHitTestResult HitTestCore (System.Windows.Media.GeometryHitTestParameters hitTestParameters);
override this.HitTestCore : System.Windows.Media.GeometryHitTestParameters -> System.Windows.Media.GeometryHitTestResult
Protected Overrides Function HitTestCore (hitTestParameters As GeometryHitTestParameters) As GeometryHitTestResult

Parameters

hitTestParameters
GeometryHitTestParameters

描述要执行的命中测试,包括初始命中点。Describes the hit test to perform, including the initial hit point.

Returns

GeometryHitTestResult

测试结果,包括计算的几何图形。Results of the test, including the evaluated geometry.

Remarks

有关在进一步派生的类中重写此方法的信息,请参阅原始虚拟方法 Visual.HitTestCoreSee the original virtual method Visual.HitTestCore for information on overriding this method in further derived classes. 请注意,有几个特定的控件(例如TextBlock)具有不同的实现,这将重写此实现。Note that several specific controls (TextBlock, for example) do have distinct implementations, which override this one.

此方法不应从应用程序代码中调用。This method is not intended to be called from your application code. 此方法支持由输入系统的各个方面公开的内部命中测试行为(例如,鼠标指针是否位于元素上)。This method supports internal hit testing behaviors that are exposed by various aspects of the input system (whether the mouse pointer is over an element, for example).

HitTestCore(PointHitTestParameters)

实现 HitTestCore(PointHitTestParameters) 以提供基元素命中测试行为(返回 HitTestResult)。Implements HitTestCore(PointHitTestParameters) to supply base element hit testing behavior (returning HitTestResult).

protected:
 override System::Windows::Media::HitTestResult ^ HitTestCore(System::Windows::Media::PointHitTestParameters ^ hitTestParameters);
protected override System.Windows.Media.HitTestResult HitTestCore (System.Windows.Media.PointHitTestParameters hitTestParameters);
override this.HitTestCore : System.Windows.Media.PointHitTestParameters -> System.Windows.Media.HitTestResult
Protected Overrides Function HitTestCore (hitTestParameters As PointHitTestParameters) As HitTestResult

Parameters

hitTestParameters
PointHitTestParameters

描述要执行的命中测试,包括初始命中点。Describes the hit test to perform, including the initial hit point.

Returns

HitTestResult

包括计算的点的测试结果。Results of the test, including the evaluated point.

Remarks

有关在进一步派生的类中重写此方法的信息,请参阅原始虚拟方法 Visual.HitTestCoreSee the original virtual method Visual.HitTestCore for information on overriding this method in further derived classes. 请注意,有几个特定的控件(例如TextBlock)具有不同的实现,它们会重写 UIElement定义的 HitTestCoreNote that several specific controls (TextBlock, for example) do have distinct implementations, which override HitTestCore as defined by UIElement.

此方法不应从应用程序代码中调用。This method is not intended to be called from your application code. 此方法支持由输入系统的各个方面公开的内部命中测试行为(例如,鼠标指针是否位于元素上)。This method supports internal hit testing behaviors that are exposed by various aspects of the input system (whether the mouse pointer is over an element, for example).

Applies to