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
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.