Condividi tramite


GeometryHitTestResult(Visual, IntersectionDetail) Costruttore

Definizione

Inizializza una nuova istanza della classe GeometryHitTestResult utilizzando un oggetto visivo specificato e un valore IntersectionDetail.

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)

Parametri

visualHit
Visual

Oggetto visivo raggiunto durante un hit test.

intersectionDetail
IntersectionDetail

Descrive l'intersezione tra un oggetto Geometry e visualHit.

Esempio

Nell'esempio seguente viene illustrato come creare un GeometryHitTestResult oggetto e usarlo come valore restituito per un'implementazione sottoposto a override di 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

Si applica a