StylusPlugIn.OnStylusLeave(RawStylusInput, Boolean) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Ocorre numa linha de caneta quando o cursor sai dos limites de um elemento.
protected:
virtual void OnStylusLeave(System::Windows::Input::StylusPlugIns::RawStylusInput ^ rawStylusInput, bool confirmed);
protected virtual void OnStylusLeave(System.Windows.Input.StylusPlugIns.RawStylusInput rawStylusInput, bool confirmed);
abstract member OnStylusLeave : System.Windows.Input.StylusPlugIns.RawStylusInput * bool -> unit
override this.OnStylusLeave : System.Windows.Input.StylusPlugIns.RawStylusInput * bool -> unit
Protected Overridable Sub OnStylusLeave (rawStylusInput As RawStylusInput, confirmed As Boolean)
Parâmetros
- rawStylusInput
- RawStylusInput
A RawStylusInput que contém informação sobre a entrada da caneta.
- confirmed
- Boolean
true se a caneta realmente saísse dos limites do elemento; caso contrário, false.
Exemplos
O exemplo seguinte reinicia quando StylusPlugIn o cursor sai dos limites do elemento.
// StylusPointCollection that contains the stylus points of the current
// stroke.
StylusPointCollection points;
// Keeps track of the stylus to check whether two styluses are used on the
// digitizer.
int currentStylus;
' StylusPointCollection that contains the stylus points of the current
' stroke.
Private points As StylusPointCollection
' Keeps track of the stylus to check whether two styluses are used on the
' digitizer.
Private currentStylus As Integer
// If the element loses focus, stop collecting the points and don't
// perform gesture recognition.
protected override void OnStylusLeave(RawStylusInput rawStylusInput, bool confirmed)
{
if (confirmed)
{
// Clear the StylusPointCollection
points = null;
currentStylus = 0;
}
}
' If the element loses focus, stop collecting the points and don't
' perform gesture recognition.
Protected Overrides Sub OnStylusLeave(ByVal rawStylusInput As RawStylusInput, ByVal confirmed As Boolean)
If confirmed Then
' Clear the StylusPointCollection
points = Nothing
currentStylus = 0
End If
End Sub
Observações
Este método ocorre numa linha de caneta, por isso minimiza o trabalho neste método para evitar impactar o desempenho.