TouchEventArgs Klasa
Definicja
Zapewnia dane dla zdarzeń wejścia Touch.Provides data for touch input events.
public ref class TouchEventArgs : System::Windows::Input::InputEventArgs
public class TouchEventArgs : System.Windows.Input.InputEventArgs
type TouchEventArgs = class
inherit InputEventArgs
Public Class TouchEventArgs
Inherits InputEventArgs
- Dziedziczenie
Przykłady
Poniższy przykład obsługuje TouchUp zdarzenia występujące w Canvas .The following example handles the TouchUp events that occur on a Canvas. Sprawdza właściwość, Captured Aby sprawdzić, czy urządzenie, które wywołało zdarzenie, jest przechwytywane do Canvas .It checks the Captured property to verify that the device that raised the event is captured to the Canvas. Jeśli jest, jest on TouchDevice publikowany.If it is, the TouchDevice is released.
Ten przykład jest częścią większego przykładu, który jest dostępny w TouchDevice przeglądzie klasy.This example is part of a larger example that is available in the TouchDevice class overview.
private void canvas_TouchUp(object sender, TouchEventArgs e)
{
Canvas _canvas = (Canvas)sender as Canvas;
if (_canvas != null && e.TouchDevice.Captured == _canvas)
{
_canvas.ReleaseTouchCapture(e.TouchDevice);
}
}
' Touch Up
Private Sub canvas_TouchUp(ByVal sender As System.Object, ByVal e As System.Windows.Input.TouchEventArgs)
Dim _canvas As Canvas = CType(sender, Canvas)
If (_canvas IsNot Nothing AndAlso e.TouchDevice.Captured Is _canvas) Then
_canvas.ReleaseTouchCapture(e.TouchDevice)
End If
End Sub
Uwagi
Używane są następujące zdarzenia TouchEventArgs .The following events use TouchEventArgs.
Konstruktory
TouchEventArgs(TouchDevice, Int32) |
Inicjuje nowe wystąpienie klasy TouchEventArgs.Initializes a new instance of the TouchEventArgs class. |
Właściwości
Device |
Pobiera urządzenie wejściowe, które zainicjowało to zdarzenie.Gets the input device that initiated this event. (Odziedziczone po InputEventArgs) |
Handled |
Pobiera lub ustawia wartość wskazującą obecny stan obsługi zdarzeń dla zdarzenia kierowanego w trakcie podróży trasy.Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. (Odziedziczone po RoutedEventArgs) |
OriginalSource |
Pobiera oryginalne źródło raportowania określone przez czyste Testy trafień przed dopuszczalną Source korektą przez klasę nadrzędną.Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. (Odziedziczone po RoutedEventArgs) |
RoutedEvent |
Pobiera lub ustawia RoutedEvent skojarzenie skojarzone z tym RoutedEventArgs wystąpieniem.Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. (Odziedziczone po RoutedEventArgs) |
Source |
Pobiera lub ustawia odwołanie do obiektu, który wywołał zdarzenie.Gets or sets a reference to the object that raised the event. (Odziedziczone po RoutedEventArgs) |
Timestamp |
Pobiera godzinę wystąpienia tego zdarzenia.Gets the time when this event occurred. (Odziedziczone po InputEventArgs) |
TouchDevice |
Pobiera wartość Touch, która wygenerowała zdarzenie.Gets the touch that generated the event. |
Metody
Equals(Object) |
Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.Determines whether the specified object is equal to the current object. (Odziedziczone po Object) |
GetHashCode() |
Służy jako domyślna funkcja skrótu.Serves as the default hash function. (Odziedziczone po Object) |
GetIntermediateTouchPoints(IInputElement) |
Zwraca wszystkie punkty dotykowe, które zostały zebrane między ostatnimi i poprzednimi zdarzeniami dotykowymi.Returns all touch points that were collected between the most recent and previous touch events. |
GetTouchPoint(IInputElement) |
Zwraca bieżącą pozycję urządzenia dotykowego względem określonego elementu.Returns the current position of the touch device relative to the specified element. |
GetType() |
Pobiera Type bieżące wystąpienie.Gets the Type of the current instance. (Odziedziczone po Object) |
InvokeEventHandler(Delegate, Object) |
Wywołuje programy obsługi zdarzeń w sposób specyficzny dla typu, co może zwiększyć wydajność systemu zdarzeń.Invokes event handlers in a type-specific way, which can increase event system efficiency. |
MemberwiseClone() |
Tworzy skróconą kopię bieżącego elementu Object .Creates a shallow copy of the current Object. (Odziedziczone po Object) |
OnSetSource(Object) |
Gdy jest zastępowany w klasie pochodnej, udostępnia punkt wejścia wywołania zwrotnego powiadomienia za każdym razem, gdy wartość Source Właściwości wystąpienia zostanie zmieniona.When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes. (Odziedziczone po RoutedEventArgs) |
ToString() |
Zwraca ciąg reprezentujący bieżący obiekt.Returns a string that represents the current object. (Odziedziczone po Object) |