Stylus Clase

Definición

Proporciona acceso a información general sobre un lápiz de tableta.

public ref class Stylus abstract sealed
public static class Stylus
type Stylus = class
Public Class Stylus
Herencia
Stylus

Ejemplos

En el ejemplo siguiente se muestra cómo registrar las coordenadas del lápiz óptico, incluso si el lápiz deja los límites de un TextBox. En este ejemplo se supone que hay un TextBox denominado textBox1y que los StylusDowneventos , StylusUpy StylusMove están conectados a controladores de eventos.

void textbox1_StylusDown(object sender, StylusDownEventArgs e)
{
    Stylus.Capture(textbox1);
}

void textbox1_StylusMove(object sender, StylusEventArgs e)
{
    Point pos = e.GetPosition(textbox1);
    textbox1.AppendText("X: " + pos.X + " Y: " + pos.Y + "\n");
}

void textbox1_StylusUp(object sender, StylusEventArgs e)
{
    Stylus.Capture(textbox1, CaptureMode.None);
}
Private Sub textbox1_StylusDown(ByVal sender As Object, ByVal e As System.Windows.Input.StylusDownEventArgs) _
    Handles textbox1.StylusDown

    Stylus.Capture(textbox1)

End Sub


Private Sub textbox1_StylusMove(ByVal sender As Object, ByVal e As StylusEventArgs) _
    Handles textbox1.StylusMove

    Dim pos As Point = e.GetPosition(textbox1)
    textbox1.AppendText("X: " & pos.X.ToString() & " Y: " & pos.Y.ToString() & vbLf)

End Sub


Private Sub textbox1_StylusUp(ByVal sender As Object, ByVal e As StylusEventArgs) _
    Handles textbox1.StylusUp

    Stylus.Capture(textbox1, CaptureMode.None)

End Sub

Campos

Nombre Description
GotStylusCaptureEvent

Identifica el GotStylusCapture evento adjunto.

IsFlicksEnabledProperty

Identifica la IsFlicksEnabled propiedad adjunta.

IsPressAndHoldEnabledProperty

Identifica la IsPressAndHoldEnabled propiedad adjunta.

IsTapFeedbackEnabledProperty

Identifica la IsTapFeedbackEnabled propiedad adjunta.

IsTouchFeedbackEnabledProperty

Identifica la IsTouchFeedbackEnabled propiedad adjunta.

LostStylusCaptureEvent

Identifica el LostStylusCapture evento adjunto.

PreviewStylusButtonDownEvent

Identifica el PreviewStylusButtonDown evento adjunto.

PreviewStylusButtonUpEvent

Identifica el PreviewStylusButtonUp evento adjunto.

PreviewStylusDownEvent

Identifica el PreviewStylusDown evento adjunto.

PreviewStylusInAirMoveEvent

Identifica el PreviewStylusInAirMove evento adjunto.

PreviewStylusInRangeEvent

Identifica el PreviewStylusInRange evento adjunto.

PreviewStylusMoveEvent

Identifica el PreviewStylusMove evento adjunto.

PreviewStylusOutOfRangeEvent

Identifica el PreviewStylusOutOfRange evento adjunto.

PreviewStylusSystemGestureEvent

Identifica el PreviewStylusSystemGesture evento adjunto.

PreviewStylusUpEvent

Identifica el PreviewStylusUp evento adjunto.

StylusButtonDownEvent

Identifica el StylusButtonDown evento adjunto.

StylusButtonUpEvent

Identifica el StylusButtonUp evento adjunto.

StylusDownEvent

Identifica el StylusDown evento adjunto.

StylusEnterEvent

Identifica el StylusEnter evento adjunto.

StylusInAirMoveEvent

Identifica el StylusInAirMove evento adjunto.

StylusInRangeEvent

Identifica el StylusInRange evento adjunto.

StylusLeaveEvent

Identifica el StylusLeave evento adjunto.

StylusMoveEvent

Identifica el StylusMove evento adjunto.

StylusOutOfRangeEvent

Identifica el StylusOutOfRange evento adjunto.

StylusSystemGestureEvent

Identifica el StylusSystemGesture evento adjunto.

StylusUpEvent

Identifica el StylusUp evento adjunto.

Propiedades

Nombre Description
Captured

Obtiene el elemento al que está enlazado el lápiz óptico.

CurrentStylusDevice

Obtiene el lápiz óptico que representa el lápiz óptico actualmente en uso.

DirectlyOver

Obtiene el elemento que está directamente debajo del lápiz óptico.

Propiedades adjuntas

Nombre Description
IsFlicksEnabled

Obtiene o establece un valor que indica si los parpadeos están habilitados.

IsPressAndHoldEnabled

Obtiene o establece un valor que indica si está habilitada la pulsación y la suspensión.

IsTapFeedbackEnabled

Obtiene o establece si un valor que indica si está habilitado el comentario de pulsación.

IsTouchFeedbackEnabled

Obtiene o establece si un valor que indica si está habilitado el comentario táctil.

Métodos

Nombre Description
AddGotStylusCaptureHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el GotStylusCapture evento adjunto.

AddLostStylusCaptureHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el LostStylusCapture evento adjunto.

AddPreviewStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Agrega un controlador para el PreviewStylusButtonDown evento adjunto.

AddPreviewStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Agrega un controlador para el PreviewStylusButtonUp evento adjunto.

AddPreviewStylusDownHandler(DependencyObject, StylusDownEventHandler)

Agrega un controlador para el PreviewStylusDown evento adjunto.

AddPreviewStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el PreviewStylusInAirMove evento adjunto.

AddPreviewStylusInRangeHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el PreviewStylusInRange evento adjunto.

AddPreviewStylusMoveHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el PreviewStylusMove evento adjunto.

AddPreviewStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el PreviewStylusOutOfRange evento adjunto.

AddPreviewStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Agrega un controlador para el PreviewStylusSystemGesture evento adjunto.

AddPreviewStylusUpHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el PreviewStylusUp evento adjunto.

AddStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Agrega un controlador para el StylusButtonDown evento adjunto.

AddStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Agrega un controlador para el StylusButtonUp evento adjunto.

AddStylusDownHandler(DependencyObject, StylusDownEventHandler)

Agrega un controlador para el StylusDown evento adjunto.

AddStylusEnterHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el StylusEnter evento adjunto.

AddStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el StylusInAirMove evento adjunto.

AddStylusInRangeHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el StylusInRange evento adjunto.

AddStylusLeaveHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el StylusLeave evento adjunto.

AddStylusMoveHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el StylusMove evento adjunto.

AddStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el StylusOutOfRange evento adjunto.

AddStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Agrega un controlador para el StylusSystemGesture evento adjunto.

AddStylusUpHandler(DependencyObject, StylusEventHandler)

Agrega un controlador para el StylusUp evento adjunto.

Capture(IInputElement, CaptureMode)

Captura el lápiz óptico en el elemento especificado.

Capture(IInputElement)

Captura el lápiz óptico en el elemento especificado.

GetIsFlicksEnabled(DependencyObject)

Obtiene el valor de la IsFlicksEnabled propiedad adjunta en el elemento especificado.

GetIsPressAndHoldEnabled(DependencyObject)

Obtiene el valor de la IsPressAndHoldEnabled propiedad adjunta en el elemento especificado.

GetIsTapFeedbackEnabled(DependencyObject)

Obtiene el valor de la IsTapFeedbackEnabled propiedad adjunta en el elemento especificado.

GetIsTouchFeedbackEnabled(DependencyObject)

Obtiene el valor de la IsTouchFeedbackEnabled propiedad adjunta en el elemento especificado.

RemoveGotStylusCaptureHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el GotStylusCapture evento adjunto.

RemoveLostStylusCaptureHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el LostStylusCapture evento adjunto.

RemovePreviewStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Quita un controlador para el PreviewStylusButtonDown evento adjunto.

RemovePreviewStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Quita un controlador para el PreviewStylusButtonUp evento adjunto.

RemovePreviewStylusDownHandler(DependencyObject, StylusDownEventHandler)

Quita un controlador para el PreviewStylusDown evento adjunto.

RemovePreviewStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el PreviewStylusInAirMove evento adjunto.

RemovePreviewStylusInRangeHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el PreviewStylusInRange evento adjunto.

RemovePreviewStylusMoveHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el PreviewStylusMove evento adjunto.

RemovePreviewStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el PreviewStylusOutOfRange evento adjunto.

RemovePreviewStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Quita un controlador para el PreviewStylusSystemGesture evento adjunto.

RemovePreviewStylusUpHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el PreviewStylusUp evento adjunto.

RemoveStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Quita un controlador para el StylusButtonDown evento adjunto.

RemoveStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Quita un controlador para el StylusButtonUp evento adjunto.

RemoveStylusDownHandler(DependencyObject, StylusDownEventHandler)

Quita un controlador para el StylusDown evento adjunto.

RemoveStylusEnterHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el StylusEnter evento adjunto.

RemoveStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el StylusInAirMove evento adjunto.

RemoveStylusInRangeHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el StylusInRange evento adjunto.

RemoveStylusLeaveHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el StylusLeave evento adjunto.

RemoveStylusMoveHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el StylusMove evento adjunto.

RemoveStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el StylusOutOfRange evento adjunto.

RemoveStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Quita un controlador para el StylusSystemGesture evento adjunto.

RemoveStylusUpHandler(DependencyObject, StylusEventHandler)

Quita un controlador para el StylusUp evento adjunto.

SetIsFlicksEnabled(DependencyObject, Boolean)

Obtiene el valor de la IsFlicksEnabled propiedad adjunta en el elemento especificado.

SetIsPressAndHoldEnabled(DependencyObject, Boolean)

Establece el valor de la IsPressAndHoldEnabled propiedad adjunta en el elemento especificado.

SetIsTapFeedbackEnabled(DependencyObject, Boolean)

Establece el valor de la IsTapFeedbackEnabled propiedad adjunta en el elemento especificado.

SetIsTouchFeedbackEnabled(DependencyObject, Boolean)

Establece el valor de la IsTouchFeedbackEnabled propiedad adjunta en el elemento especificado.

Synchronize()

Sincroniza el cursor y la interfaz de usuario.

Eventos adjuntos

Nombre Description
GotStylusCapture

Se produce cuando un elemento captura los eventos del lápiz óptico.

LostStylusCapture

Se produce cuando un elemento libera eventos de lápiz óptico.

PreviewStylusButtonDown

Se produce cuando el usuario presiona uno de los botones del lápiz óptico.

PreviewStylusButtonUp

Se produce cuando el usuario suelta uno de los botones del lápiz óptico.

PreviewStylusDown

Se produce cuando el usuario toca la punta del lápiz óptico en la tableta.

PreviewStylusInAirMove

Se produce si el lápiz se mueve mientras está dentro del intervalo de (pero no tocar) la tableta.

PreviewStylusInRange

Se produce cuando el lápiz está dentro del intervalo de la tableta.

PreviewStylusMove

Se produce cuando el lápiz se mueve mientras se toca la tableta.

PreviewStylusOutOfRange

Se produce cuando el lápiz se queda fuera del rango de la tableta.

PreviewStylusSystemGesture

Se produce cuando el usuario realiza un gesto del sistema con este lápiz óptico.

PreviewStylusUp

Se produce cuando el usuario eleva el lápiz óptico desde la tableta.

StylusButtonDown

Se produce cuando el usuario presiona uno de los botones del lápiz óptico.

StylusButtonUp

Se produce cuando el usuario suelta uno de los botones del lápiz óptico.

StylusDown

Se produce cuando el usuario toca la punta del lápiz óptico en la tableta.

StylusEnter

Se produce cuando el cursor del lápiz óptico entra en los límites de un elemento.

StylusInAirMove

Se produce cuando el lápiz se mueve mientras está en el rango de, pero no tocar, la tableta.

StylusInRange

Se produce cuando el lápiz está dentro del intervalo de la tableta.

StylusLeave

Se produce cuando el cursor del lápiz óptico deja los límites de un elemento.

StylusMove

Se produce cuando el lápiz se mueve mientras se toca la tableta.

StylusOutOfRange

Se produce cuando el lápiz se queda fuera del rango de la tableta.

StylusSystemGesture

Se produce cuando el usuario realiza un gesto del sistema con este lápiz óptico.

StylusUp

Se produce cuando el usuario genera el lápiz óptico desde el pc tablet.

Se aplica a