/// <summary> /// Event handler for stylus up; needs to be handled when map was previously panned. /// </summary> /// <param name="sender">Sender of the StylusButtonUp event.</param> /// <param name="e">Event parameters.</param> private void mapView_StylusButtonUp(object sender, StylusButtonEventArgs e) { if (wasPanned) { e.Handled = true; } }
private void TegakiCanvas_PreviewStylusButtonDown(object sender, StylusButtonEventArgs e) { if (e.StylusButton.Name != "Barrel Switch") { return; } TegakiCanvas.EditingMode = InkCanvasEditingMode.Select; }
void Window1_StylusButtonDown(object sender, StylusButtonEventArgs e) { // <Snippet27> // Get tablet device that generated event //TabletDevice myTabletDevice = e.TabletDevice; //TabletDevice myTabletDevice = (TabletDevice) e.Device; // </Snippet27> }
private void StylusDebugWindow_StylusButtonDown(object sender, StylusButtonEventArgs e) { var str = ""; str += "Button : " + e.StylusButton.Name; str += " GUID : " + e.StylusButton.Guid; EventsBox.Text = str; }
private void HandleStylusUp(object sender, StylusButtonEventArgs e) { penPressedButtonsCount--; var eventType = penPressedButtonsCount > 0 ? PointerEventType.Moved : PointerEventType.Released; var updateKind = e.Inverted ? PointerUpdateKind.RightButtonReleased : PointerUpdateKind.LeftButtonReleased; AddPenPointerEvent(eventType, updateKind, false, e); }
// This isn't hooked up to anything. // <Snippet24> void OnStylusButtonDown(object sender, StylusButtonEventArgs e) { StylusButton myStylusButton = e.StylusButton; if (myStylusButton.Guid == StylusPointProperties.BarrelButton.Id) { // the barrel button on the stylus has been pressed } }
private void HandleStylusDown(object sender, StylusButtonEventArgs e) { penPressedButtonsCount++; var eventType = penPressedButtonsCount > 1 ? PointerEventType.Moved : PointerEventType.Pressed; var updateKind = e.Inverted ? PointerUpdateKind.RightButtonPressed : PointerUpdateKind.LeftButtonPressed; AddPenPointerEvent(eventType, updateKind, true, e); }
private void OCRCanvas_PreviewStylusButtonDown(object sender, StylusButtonEventArgs e) { if (e.StylusButton.Name != "Barrel Switch") { return; } Panel.SetZIndex(TegakiCanvas, 10); TegakiCanvas.EditingMode = InkCanvasEditingMode.Select; TegakiCanvas.ContextMenu = NormalMenu; }
/// <summary> /// Occurs when the stylus button is released /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void InkCanvas_StylusButtonUp(object sender, StylusButtonEventArgs e) { if (e.StylusButton.Guid != StylusPointProperties.BarrelButton.Id) { return; } if (selector.Selection.Count == 0) { RemoveSelectWidget(); } }
private void Button_PreviewStylusButtonUp(object sender, StylusButtonEventArgs e) { FrameworkElement button = sender as FrameworkElement; if (button == null || VM == null) { return; } // VisualStateManager.GoToState(button, "NormalState", true); button.ReleaseStylusCapture(); }
private void TegakiCanvas_PreviewStylusButtonUp(object sender, StylusButtonEventArgs e) { if (e.StylusButton.Name != "Barrel Switch") { return; } TegakiCanvas.EditingMode = InkCanvasEditingMode.Ink; if (OCRButton.IsChecked == true) { Panel.SetZIndex(TegakiCanvas, 0); } }
//</Snippet12> //<Snippet11> void textbox1_StylusButtonUp(object sender, StylusButtonEventArgs e) { if (e.StylusButton.Guid != StylusPointProperties.BarrelButton.Id) { return; } if (textbox1.SelectedText == "") { return; } Clipboard.SetDataObject(textbox1.SelectedText); }
private void GeneralButtonEventHandler(StylusButtonEventArgs e, bool isPressed) { StylusButton myStylusButton = e.StylusButton; if (myStylusButton.Guid == StylusPointProperties.BarrelButton.Id) { currentApp.tabletState.Update("/input/stylus/barrel/click", isPressed); } else if (myStylusButton.Guid == StylusPointProperties.SecondaryTipButton.Id) { currentApp.tabletState.Update("/input/stylus/eraser/click", isPressed); } e.Handled = true; }
private void Button_PreviewStylusButtonDown(object sender, StylusButtonEventArgs e) { FrameworkElement button = sender as FrameworkElement; if (button == null || VM == null) { return; } VisualStateManager.GoToState(button, "PressedState", true); button.CaptureStylus(); // itemView = button.DataContext as BaseDescriptor; // ViewModel.SelectedVisual = itemView; }
//</Snippet3> //<Snippet2> // Show or hide a shortcut menu when the user clicks the barrel button. void textbox1_StylusButtonDown(object sender, StylusButtonEventArgs e) { if (e.StylusButton.Guid != StylusPointProperties.BarrelButton.Id) { return; } if (textbox1.ContextMenu == null) { textbox1.ContextMenu = textBoxContextMenu; } else { textbox1.ContextMenu = null; } }
/// <summary> /// Occurs when the stylus button is pressed down - sets you into selection mode /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void InkCanvas_StylusButtonDown(object sender, StylusButtonEventArgs e) { if (e.StylusButton.Guid != StylusPointProperties.BarrelButton.Id) { return; } if (editActive) { RemoveEditWidget(); } if (labelActive) { RemoveLabelWidget(); } if (!selectionActive) { SetSelectWidget(); } }
void attachedElement_StylusButtonDown(object sender, StylusButtonEventArgs e) { e.Handled = true; }
public static string ToText(this StylusButtonEventArgs e) { return(e.StylusButton.Name + e.StylusButton.StylusButtonState.ToString() + e.StylusDevice.ToText()); }
private void statusWindow_StylusButtonDown(object sender, StylusButtonEventArgs e) { CloseIfComplete(); }
private void InkCanvas_StylusButtonUp(object sender, StylusButtonEventArgs e) { GeneralButtonEventHandler(e, false); }
private void cProbe_StylusButtonUp(object sender, StylusButtonEventArgs e) { DisplayEvent("StylusButtonUp", e.ToText()); }
private void Window_PreviewStylusButtonDown(object sender, StylusButtonEventArgs e) { NewEvent("Window_PreviewStylusButtonDown"); }
private void Window_StylusButtonUp(object sender, StylusButtonEventArgs e) { NewEvent("Window_StylusButtonUp"); }
protected override void OnStylusButtonUp(StylusButtonEventArgs e) { base.OnStylusButtonUp(e); }
private void lvMnMAvanzado_StylusButtonDown(object sender, StylusButtonEventArgs e) { lvMnMAvanzado.SelectedItems.Clear(); }
protected override void OnPreviewStylusButtonDown(StylusButtonEventArgs e) { base.OnPreviewStylusButtonDown(e); }
private void Button_StylusButtonDown(object sender, StylusButtonEventArgs e) { }
void attachedElement_PreviewStylusButtonDown(object sender, StylusButtonEventArgs e) { GenericStylusEventHandler(UIElement.PreviewStylusButtonDownEvent, UIElement.StylusButtonDownEvent, e, new StylusButtonEventArgs(e.StylusDevice, e.Timestamp, e.StylusButton)); }
//</Snippet14> //<Snippet13> void textbox1_PreviewStylusButtonDown(object sender, StylusButtonEventArgs e) { textbox1.AppendText(e.StylusButton.Name + "\n"); }
private void InkCanvas_StylusButtonDown(object sender, StylusButtonEventArgs e) { GeneralButtonEventHandler(e, true); }