Partilhar via


GeometryHitTestResult(Visual, IntersectionDetail) Construtor

Definição

Inicializa uma nova instância da classe GeometryHitTestResult usando um objeto visual especificado e o valor 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)

Parâmetros

visualHit
Visual

O objeto visual que é acessado durante um teste de clique.

intersectionDetail
IntersectionDetail

Descreve a interseção entre um Geometry e visualHit.

Exemplos

O exemplo a seguir mostra como criar um GeometryHitTestResult objeto e usá-lo como um valor retornado para uma implementação substituída de 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

Aplica-se a