StylusPoint.GetPropertyValue(StylusPointProperty) Metod

Definition

Returnerar värdet för den angivna egenskapen.

public:
 int GetPropertyValue(System::Windows::Input::StylusPointProperty ^ stylusPointProperty);
public int GetPropertyValue(System.Windows.Input.StylusPointProperty stylusPointProperty);
member this.GetPropertyValue : System.Windows.Input.StylusPointProperty -> int
Public Function GetPropertyValue (stylusPointProperty As StylusPointProperty) As Integer

Parametrar

stylusPointProperty
StylusPointProperty

Som StylusPointProperty anger vilket egenskapsvärde som ska hämtas.

Returer

Värdet för den angivna StylusPointProperty.

Undantag

stylusPointProperty är inte en av egenskaperna i Description.

Exempel

I följande exempel kontrolleras förekomsten av en egenskap för pennans punkt innan egenskapens värde hämtas. Det här exemplet förutsätter att det finns ett StylusPoint som heter point.

if (point.HasProperty(StylusPointProperties.PitchRotation))
{
    int pitchRotation = point.GetPropertyValue(StylusPointProperties.PitchRotation);
}
If point.HasProperty(StylusPointProperties.PitchRotation) Then
    Dim pitchRotation As Integer = _
            point.GetPropertyValue(StylusPointProperties.PitchRotation)
End If

Kommentarer

Om du vill kontrollera om StylusPoint innehåller den angivna egenskapen anropar HasProperty du innan du anropar antingen GetPropertyValue -metoden eller SetPropertyValue -metoden.

Gäller för