GeometryHitTestResult(Visual, IntersectionDetail) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the GeometryHitTestResult class by using a specified visual object and IntersectionDetail value.
public:
GeometryHitTestResult(System::Windows::Media::Visual ^ visualHit, System::Windows::Media::IntersectionDetail intersectionDetail);
public GeometryHitTestResult(System.Windows.Media.Visual visualHit, System.Windows.Media.IntersectionDetail intersectionDetail);
new System.Windows.Media.GeometryHitTestResult : System.Windows.Media.Visual * System.Windows.Media.IntersectionDetail -> System.Windows.Media.GeometryHitTestResult
Public Sub New (visualHit As Visual, intersectionDetail As IntersectionDetail)
Parameters
- visualHit
- Visual
The visual object that is hit during a hit test.
- intersectionDetail
- IntersectionDetail
Describes the intersection between a Geometry and visualHit
.
Examples
The following example shows how to create a GeometryHitTestResult object and use it as a return value for an overridden implementation of HitTestCore.
// Override default hit test support in visual object.
protected override GeometryHitTestResult HitTestCore(GeometryHitTestParameters hitTestParameters)
{
IntersectionDetail intersectionDetail = IntersectionDetail.NotCalculated;
// Perform custom actions during the hit test processing.
return new GeometryHitTestResult(this, intersectionDetail);
}
' Override default hit test support in visual object.
Protected Overrides Overloads Function HitTestCore(ByVal hitTestParameters As GeometryHitTestParameters) As GeometryHitTestResult
Dim intersectionDetail As IntersectionDetail = IntersectionDetail.NotCalculated
' Perform custom actions during the hit test processing.
Return New GeometryHitTestResult(Me, intersectionDetail)
End Function
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET