Stylus Classe

Definição

Fornece acesso a informações gerais sobre uma caneta tablet.

public ref class Stylus abstract sealed
public static class Stylus
type Stylus = class
Public Class Stylus
Herança
Stylus

Exemplos

O exemplo a seguir demonstra como registrar as coordenadas da caneta, mesmo que a caneta deixe os limites de um TextBox. Este exemplo pressupõe que há um TextBox chamado textBox1, e que o StylusDown, StylusUpe StylusMove os eventos estão conectados a manipuladores 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

Nome Description
GotStylusCaptureEvent

Identifica o GotStylusCapture evento anexado.

IsFlicksEnabledProperty

Identifica a IsFlicksEnabled propriedade anexada.

IsPressAndHoldEnabledProperty

Identifica a IsPressAndHoldEnabled propriedade anexada.

IsTapFeedbackEnabledProperty

Identifica a IsTapFeedbackEnabled propriedade anexada.

IsTouchFeedbackEnabledProperty

Identifica a IsTouchFeedbackEnabled propriedade anexada.

LostStylusCaptureEvent

Identifica o LostStylusCapture evento anexado.

PreviewStylusButtonDownEvent

Identifica o PreviewStylusButtonDown evento anexado.

PreviewStylusButtonUpEvent

Identifica o PreviewStylusButtonUp evento anexado.

PreviewStylusDownEvent

Identifica o PreviewStylusDown evento anexado.

PreviewStylusInAirMoveEvent

Identifica o PreviewStylusInAirMove evento anexado.

PreviewStylusInRangeEvent

Identifica o PreviewStylusInRange evento anexado.

PreviewStylusMoveEvent

Identifica o PreviewStylusMove evento anexado.

PreviewStylusOutOfRangeEvent

Identifica o PreviewStylusOutOfRange evento anexado.

PreviewStylusSystemGestureEvent

Identifica o PreviewStylusSystemGesture evento anexado.

PreviewStylusUpEvent

Identifica o PreviewStylusUp evento anexado.

StylusButtonDownEvent

Identifica o StylusButtonDown evento anexado.

StylusButtonUpEvent

Identifica o StylusButtonUp evento anexado.

StylusDownEvent

Identifica o StylusDown evento anexado.

StylusEnterEvent

Identifica o StylusEnter evento anexado.

StylusInAirMoveEvent

Identifica o StylusInAirMove evento anexado.

StylusInRangeEvent

Identifica o StylusInRange evento anexado.

StylusLeaveEvent

Identifica o StylusLeave evento anexado.

StylusMoveEvent

Identifica o StylusMove evento anexado.

StylusOutOfRangeEvent

Identifica o StylusOutOfRange evento anexado.

StylusSystemGestureEvent

Identifica o StylusSystemGesture evento anexado.

StylusUpEvent

Identifica o StylusUp evento anexado.

Propriedades

Nome Description
Captured

Obtém o elemento ao qual a caneta está associada.

CurrentStylusDevice

Obtém a caneta que representa a caneta atualmente em uso.

DirectlyOver

Obtém o elemento que está diretamente abaixo da caneta.

Propriedades Anexadas

Nome Description
IsFlicksEnabled

Obtém ou define um valor que indica se os movimentos estão habilitados.

IsPressAndHoldEnabled

Obtém ou define um valor que indica se a tecla e a retenção estão habilitadas.

IsTapFeedbackEnabled

Obtém ou define se um valor que indica se os comentários de toque estão habilitados.

IsTouchFeedbackEnabled

Obtém ou define se um valor que indica se os comentários por toque estão habilitados.

Métodos

Nome Description
AddGotStylusCaptureHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o GotStylusCapture evento anexado.

AddLostStylusCaptureHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o LostStylusCapture evento anexado.

AddPreviewStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Adiciona um manipulador para o PreviewStylusButtonDown evento anexado.

AddPreviewStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Adiciona um manipulador para o PreviewStylusButtonUp evento anexado.

AddPreviewStylusDownHandler(DependencyObject, StylusDownEventHandler)

Adiciona um manipulador para o PreviewStylusDown evento anexado.

AddPreviewStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o PreviewStylusInAirMove evento anexado.

AddPreviewStylusInRangeHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o PreviewStylusInRange evento anexado.

AddPreviewStylusMoveHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o PreviewStylusMove evento anexado.

AddPreviewStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o PreviewStylusOutOfRange evento anexado.

AddPreviewStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Adiciona um manipulador para o PreviewStylusSystemGesture evento anexado.

AddPreviewStylusUpHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o PreviewStylusUp evento anexado.

AddStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Adiciona um manipulador para o StylusButtonDown evento anexado.

AddStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Adiciona um manipulador para o StylusButtonUp evento anexado.

AddStylusDownHandler(DependencyObject, StylusDownEventHandler)

Adiciona um manipulador para o StylusDown evento anexado.

AddStylusEnterHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o StylusEnter evento anexado.

AddStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o StylusInAirMove evento anexado.

AddStylusInRangeHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o StylusInRange evento anexado.

AddStylusLeaveHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o StylusLeave evento anexado.

AddStylusMoveHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o StylusMove evento anexado.

AddStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o StylusOutOfRange evento anexado.

AddStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Adiciona um manipulador para o StylusSystemGesture evento anexado.

AddStylusUpHandler(DependencyObject, StylusEventHandler)

Adiciona um manipulador para o StylusUp evento anexado.

Capture(IInputElement, CaptureMode)

Captura a caneta para o elemento especificado.

Capture(IInputElement)

Captura a caneta para o elemento especificado.

GetIsFlicksEnabled(DependencyObject)

Obtém o valor da IsFlicksEnabled propriedade anexada no elemento especificado.

GetIsPressAndHoldEnabled(DependencyObject)

Obtém o valor da IsPressAndHoldEnabled propriedade anexada no elemento especificado.

GetIsTapFeedbackEnabled(DependencyObject)

Obtém o valor da IsTapFeedbackEnabled propriedade anexada no elemento especificado.

GetIsTouchFeedbackEnabled(DependencyObject)

Obtém o valor da IsTouchFeedbackEnabled propriedade anexada no elemento especificado.

RemoveGotStylusCaptureHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o GotStylusCapture evento anexado.

RemoveLostStylusCaptureHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o LostStylusCapture evento anexado.

RemovePreviewStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Remove um manipulador para o PreviewStylusButtonDown evento anexado.

RemovePreviewStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Remove um manipulador para o PreviewStylusButtonUp evento anexado.

RemovePreviewStylusDownHandler(DependencyObject, StylusDownEventHandler)

Remove um manipulador para o PreviewStylusDown evento anexado.

RemovePreviewStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o PreviewStylusInAirMove evento anexado.

RemovePreviewStylusInRangeHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o PreviewStylusInRange evento anexado.

RemovePreviewStylusMoveHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o PreviewStylusMove evento anexado.

RemovePreviewStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o PreviewStylusOutOfRange evento anexado.

RemovePreviewStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Remove um manipulador para o PreviewStylusSystemGesture evento anexado.

RemovePreviewStylusUpHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o PreviewStylusUp evento anexado.

RemoveStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Remove um manipulador para o StylusButtonDown evento anexado.

RemoveStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Remove um manipulador para o StylusButtonUp evento anexado.

RemoveStylusDownHandler(DependencyObject, StylusDownEventHandler)

Remove um manipulador para o StylusDown evento anexado.

RemoveStylusEnterHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o StylusEnter evento anexado.

RemoveStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o StylusInAirMove evento anexado.

RemoveStylusInRangeHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o StylusInRange evento anexado.

RemoveStylusLeaveHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o StylusLeave evento anexado.

RemoveStylusMoveHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o StylusMove evento anexado.

RemoveStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o StylusOutOfRange evento anexado.

RemoveStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Remove um manipulador para o StylusSystemGesture evento anexado.

RemoveStylusUpHandler(DependencyObject, StylusEventHandler)

Remove um manipulador para o StylusUp evento anexado.

SetIsFlicksEnabled(DependencyObject, Boolean)

Obtém o valor da IsFlicksEnabled propriedade anexada no elemento especificado.

SetIsPressAndHoldEnabled(DependencyObject, Boolean)

Define o valor da IsPressAndHoldEnabled propriedade anexada no elemento especificado.

SetIsTapFeedbackEnabled(DependencyObject, Boolean)

Define o valor da IsTapFeedbackEnabled propriedade anexada no elemento especificado.

SetIsTouchFeedbackEnabled(DependencyObject, Boolean)

Define o valor da IsTouchFeedbackEnabled propriedade anexada no elemento especificado.

Synchronize()

Sincroniza o cursor e a interface do usuário.

Eventos Anexados

Nome Description
GotStylusCapture

Ocorre quando um elemento captura os eventos de caneta.

LostStylusCapture

Ocorre quando um elemento libera eventos de caneta.

PreviewStylusButtonDown

Ocorre quando o usuário pressiona um dos botões na caneta.

PreviewStylusButtonUp

Ocorre quando o usuário libera um dos botões na caneta.

PreviewStylusDown

Ocorre quando o usuário toca a ponta da caneta no tablet.

PreviewStylusInAirMove

Ocorre se a caneta se move enquanto está dentro do intervalo de (mas não tocando) o tablet.

PreviewStylusInRange

Ocorre quando a caneta está dentro do intervalo do tablet.

PreviewStylusMove

Ocorre quando a caneta se move enquanto está tocando o tablet.

PreviewStylusOutOfRange

Ocorre quando a caneta sai do intervalo do tablet.

PreviewStylusSystemGesture

Ocorre quando o usuário faz um gesto de sistema com essa caneta.

PreviewStylusUp

Ocorre quando o usuário levanta a caneta do tablet.

StylusButtonDown

Ocorre quando o usuário pressiona um dos botões na caneta.

StylusButtonUp

Ocorre quando o usuário libera um dos botões na caneta.

StylusDown

Ocorre quando o usuário toca a ponta da caneta no tablet.

StylusEnter

Ocorre quando o cursor de caneta entra nos limites de um elemento.

StylusInAirMove

Ocorre quando a caneta se move enquanto está no intervalo de, mas não tocando, o tablet.

StylusInRange

Ocorre quando a caneta está dentro do intervalo do tablet.

StylusLeave

Ocorre quando o cursor de caneta deixa os limites de um elemento.

StylusMove

Ocorre quando a caneta se move enquanto está tocando o tablet.

StylusOutOfRange

Ocorre quando a caneta sai do intervalo do tablet.

StylusSystemGesture

Ocorre quando o usuário faz um gesto de sistema com essa caneta.

StylusUp

Ocorre quando o usuário gera a caneta do Tablet PC.

Aplica-se a