Stylus Classe

Definição

Dá acesso a informações gerais sobre uma caneta para tablet.

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

Exemplos

O exemplo seguinte demonstra como registar as coordenadas da stylus, mesmo que a stylus deixe os limites de um TextBox. Este exemplo assume que existe um TextBox chamado textBox1, e que os StylusDown, StylusUp, e StylusMove os eventos estão ligados 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

Name 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

Name Description
Captured

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

CurrentStylusDevice

Recebe a caneta que representa a caneta atualmente em uso.

DirectlyOver

Recebe o elemento que está diretamente por baixo da caneta.

Propriedades Anexadas

Name Description
IsFlicksEnabled

Recebe ou define um valor que indica se os flicks estão ativados.

IsPressAndHoldEnabled

Recebe ou define valores que indicam se o press and hold está ativado.

IsTapFeedbackEnabled

Obtém ou define se um valor indica se o tap feedback está ativado.

IsTouchFeedbackEnabled

Obtém ou define se um valor indica se o feedback tátil está ativado.

Métodos

Name Description
AddGotStylusCaptureHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o GotStylusCapture evento anexado.

AddLostStylusCaptureHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o LostStylusCapture evento anexado.

AddPreviewStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Adiciona um handler para o PreviewStylusButtonDown evento anexado.

AddPreviewStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Adiciona um handler para o PreviewStylusButtonUp evento anexado.

AddPreviewStylusDownHandler(DependencyObject, StylusDownEventHandler)

Adiciona um handler para o PreviewStylusDown evento anexado.

AddPreviewStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o PreviewStylusInAirMove evento anexado.

AddPreviewStylusInRangeHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o PreviewStylusInRange evento anexado.

AddPreviewStylusMoveHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o PreviewStylusMove evento anexado.

AddPreviewStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o PreviewStylusOutOfRange evento anexado.

AddPreviewStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Adiciona um handler para o PreviewStylusSystemGesture evento anexado.

AddPreviewStylusUpHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o PreviewStylusUp evento anexado.

AddStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Adiciona um handler para o StylusButtonDown evento anexado.

AddStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Adiciona um handler para o StylusButtonUp evento anexado.

AddStylusDownHandler(DependencyObject, StylusDownEventHandler)

Adiciona um handler para o StylusDown evento anexado.

AddStylusEnterHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o StylusEnter evento anexado.

AddStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o StylusInAirMove evento anexado.

AddStylusInRangeHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o StylusInRange evento anexado.

AddStylusLeaveHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o StylusLeave evento anexado.

AddStylusMoveHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o StylusMove evento anexado.

AddStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o StylusOutOfRange evento anexado.

AddStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Adiciona um handler para o StylusSystemGesture evento anexado.

AddStylusUpHandler(DependencyObject, StylusEventHandler)

Adiciona um handler para o StylusUp evento anexado.

Capture(IInputElement, CaptureMode)

Captura a agulha no elemento especificado.

Capture(IInputElement)

Captura a agulha no elemento especificado.

GetIsFlicksEnabled(DependencyObject)

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

GetIsPressAndHoldEnabled(DependencyObject)

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

GetIsTapFeedbackEnabled(DependencyObject)

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

GetIsTouchFeedbackEnabled(DependencyObject)

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

RemoveGotStylusCaptureHandler(DependencyObject, StylusEventHandler)

Remove um handler para o GotStylusCapture evento anexo.

RemoveLostStylusCaptureHandler(DependencyObject, StylusEventHandler)

Remove um handler para o LostStylusCapture evento anexo.

RemovePreviewStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Remove um handler para o PreviewStylusButtonDown evento anexo.

RemovePreviewStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Remove um handler para o PreviewStylusButtonUp evento anexo.

RemovePreviewStylusDownHandler(DependencyObject, StylusDownEventHandler)

Remove um handler para o PreviewStylusDown evento anexo.

RemovePreviewStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Remove um handler para o PreviewStylusInAirMove evento anexo.

RemovePreviewStylusInRangeHandler(DependencyObject, StylusEventHandler)

Remove um handler para o PreviewStylusInRange evento anexo.

RemovePreviewStylusMoveHandler(DependencyObject, StylusEventHandler)

Remove um handler para o PreviewStylusMove evento anexo.

RemovePreviewStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Remove um handler para o PreviewStylusOutOfRange evento anexo.

RemovePreviewStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Remove um handler para o PreviewStylusSystemGesture evento anexo.

RemovePreviewStylusUpHandler(DependencyObject, StylusEventHandler)

Remove um handler para o PreviewStylusUp evento anexo.

RemoveStylusButtonDownHandler(DependencyObject, StylusButtonEventHandler)

Remove um handler para o StylusButtonDown evento anexo.

RemoveStylusButtonUpHandler(DependencyObject, StylusButtonEventHandler)

Remove um handler para o StylusButtonUp evento anexo.

RemoveStylusDownHandler(DependencyObject, StylusDownEventHandler)

Remove um handler para o StylusDown evento anexo.

RemoveStylusEnterHandler(DependencyObject, StylusEventHandler)

Remove um handler para o StylusEnter evento anexo.

RemoveStylusInAirMoveHandler(DependencyObject, StylusEventHandler)

Remove um handler para o StylusInAirMove evento anexo.

RemoveStylusInRangeHandler(DependencyObject, StylusEventHandler)

Remove um handler para o StylusInRange evento anexo.

RemoveStylusLeaveHandler(DependencyObject, StylusEventHandler)

Remove um handler para o StylusLeave evento anexo.

RemoveStylusMoveHandler(DependencyObject, StylusEventHandler)

Remove um handler para o StylusMove evento anexo.

RemoveStylusOutOfRangeHandler(DependencyObject, StylusEventHandler)

Remove um handler para o StylusOutOfRange evento anexo.

RemoveStylusSystemGestureHandler(DependencyObject, StylusSystemGestureEventHandler)

Remove um handler para o StylusSystemGesture evento anexo.

RemoveStylusUpHandler(DependencyObject, StylusEventHandler)

Remove um handler para o StylusUp evento anexo.

SetIsFlicksEnabled(DependencyObject, Boolean)

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

SetIsPressAndHoldEnabled(DependencyObject, Boolean)

Define o valor da IsPressAndHoldEnabled propriedade associada ao elemento especificado.

SetIsTapFeedbackEnabled(DependencyObject, Boolean)

Define o valor da IsTapFeedbackEnabled propriedade associada ao elemento especificado.

SetIsTouchFeedbackEnabled(DependencyObject, Boolean)

Define o valor da IsTouchFeedbackEnabled propriedade associada ao elemento especificado.

Synchronize()

Sincroniza o cursor e a interface do utilizador.

Eventos Anexados

Name Description
GotStylusCapture

Ocorre quando um elemento capta os eventos do stylus.

LostStylusCapture

Ocorre quando um elemento liberta eventos da stylus.

PreviewStylusButtonDown

Ocorre quando o utilizador pressiona um dos botões da caneta.

PreviewStylusButtonUp

Ocorre quando o utilizador solta um dos botões da caneta.

PreviewStylusDown

Ocorre quando o utilizador toca a ponta da caneta no tablet.

PreviewStylusInAirMove

Acontece se a caneta se mover enquanto está dentro do alcance (mas sem tocar) no tablet.

PreviewStylusInRange

Ocorre quando a caneta se aproxima do alcance do tablet.

PreviewStylusMove

Acontece quando a caneta se move enquanto está a tocar no tablet.

PreviewStylusOutOfRange

Acontece quando a caneta sai do alcance do tablet.

PreviewStylusSystemGesture

Ocorre quando o utilizador faz um gesto do sistema com esta caneta.

PreviewStylusUp

Ocorre quando o utilizador levanta a caneta do tablet.

StylusButtonDown

Ocorre quando o utilizador pressiona um dos botões da caneta.

StylusButtonUp

Ocorre quando o utilizador solta um dos botões da caneta.

StylusDown

Ocorre quando o utilizador toca a ponta da caneta no tablet.

StylusEnter

Ocorre quando o cursor do stylus entra nos limites de um elemento.

StylusInAirMove

Ocorre quando a caneta se move enquanto está ao alcance do tablet, mas sem tocar.

StylusInRange

Ocorre quando a caneta se aproxima do alcance do tablet.

StylusLeave

Ocorre quando o cursor da stylus sai dos limites de um elemento.

StylusMove

Acontece quando a caneta se move enquanto está a tocar no tablet.

StylusOutOfRange

Acontece quando a caneta sai do alcance do tablet.

StylusSystemGesture

Ocorre quando o utilizador faz um gesto do sistema com esta caneta.

StylusUp

Ocorre quando o utilizador levanta a caneta a partir do tablet PC.

Aplica-se a