Поделиться через


InkPicture.SystemGesture - событие

Обновлен: Ноябрь 2007

Occurs when a system gesture is recognized.

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
Public Event SystemGesture As InkCollectorSystemGestureEventHandler
'Применение
Dim instance As InkPicture
Dim handler As InkCollectorSystemGestureEventHandler

AddHandler instance.SystemGesture, handler
public event InkCollectorSystemGestureEventHandler SystemGesture
public:
 event InkCollectorSystemGestureEventHandler^ SystemGesture {
    void add (InkCollectorSystemGestureEventHandler^ value);
    void remove (InkCollectorSystemGestureEventHandler^ value);
}
/** @event */
public void add_SystemGesture (InkCollectorSystemGestureEventHandler value)
/** @event */
public void remove_SystemGesture (InkCollectorSystemGestureEventHandler value)
JScript не поддерживает события.

Заметки

System gestures give information about the Cursor object that is being used to create the gesture. They also provide shortcuts to combinations of mouse events and are effective ways to detect mouse events.

For example, instead of listening for a MouseUpand MouseDownpair of events with no other mouse events occurring in between, you can listen for the Tap or RightTap system gestures.

As another example, instead of listening for MouseDownand MouseMoveevents and getting numerous MouseMovemessages, you can listen for the Drag or RightDrag system gestures, as long as you do not need the (x, y) coordinates of every position of the mouse. This allows you to receive only one message instead of numerous MouseMovemessages.

For a list of specific system gestures, see the SystemGesture enumeration type. For more information about system gestures, see Using Gestures and Command Input on the Tablet PC.

The event handler receives an argument of type InkCollectorSystemGestureEventArgs that contains data about this event.

When you create an InkCollectorSystemGestureEventHandler delegate, you identify the method that handles the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

Примеры

The event handler in this example displays system gesture information on a status bar label, statusLabelSysGesture.

Private Sub Event_OnSystemGesture(ByVal sender As Object, ByVal e As InkCollectorSystemGestureEventArgs)
    Select Case e.Id
        Case SystemGesture.Tap
            Me.statusLabelSysGesture.Text = "Tap"
        Case SystemGesture.DoubleTap
            Me.statusLabelSysGesture.Text = "Double Tap"

    End Select
End Sub
private void Event_OnSystemGesture(object sender, InkCollectorSystemGestureEventArgs e)
{
    switch (e.Id)
    {
        case SystemGesture.Tap:
            this.statusLabelSysGesture.Text = "Tap";
            break;
        case SystemGesture.DoubleTap:
            this.statusLabelSysGesture.Text = "Double Tap";
            break;
    }

}

Prior to collection of system gestures, the InkPicture object, mInkPicture registers the event handler.

' register the SystemGesture event handler
AddHandler mInkPicture.SystemGesture, New InkCollectorSystemGestureEventHandler(AddressOf Event_OnSystemGesture)
// register the SystemGesture event handler
mInkPicture.SystemGesture += new InkCollectorSystemGestureEventHandler(Event_OnSystemGesture);

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

InkPicture Класс

InkPicture - члены

Microsoft.Ink - пространство имен

Cursor

InkCollectorSystemGestureEventArgs

SystemGesture

Другие ресурсы

Using Gestures