/// <summary> /// Called when the stylus button is released while the stylus is hovering over /// the ink canvas, /// </summary> private void Canvas_StylusButtonUp(object sender, System.Windows.Input.StylusButtonEventArgs e) { // Check if the barrel button was released. if (e.StylusButton.Guid == System.Windows.Input.StylusPointProperties.BarrelButton.Id) { // Set the editing mode of the canvas to ink. canvas.EditingMode = System.Windows.Controls.InkCanvasEditingMode.Ink; } }
/// <summary> /// Called when the stylus button is pressed while the stylus is hovering over /// the ink canvas. /// </summary> private void Canvas_StylusButtonDown(object sender, System.Windows.Input.StylusButtonEventArgs e) { // Check if the barrel button was pressed. if (e.StylusButton.Guid == System.Windows.Input.StylusPointProperties.BarrelButton.Id) { // Set the editing mode of the canvas to erase by stroke. canvas.EditingMode = System.Windows.Controls.InkCanvasEditingMode.EraseByStroke; } }
protected internal virtual new void OnStylusButtonUp(System.Windows.Input.StylusButtonEventArgs e) { }
protected internal virtual new void OnPreviewStylusButtonDown(System.Windows.Input.StylusButtonEventArgs e) { }
private void Window_StylusButtonUp(object sender, System.Windows.Input.StylusButtonEventArgs e) { logger.InfoFormat("{0:D3}.{1}", ++numberIndex, MethodBase.GetCurrentMethod().Name); }