コード例 #1
0
 /// <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;
     }
 }
コード例 #2
0
 private void TegakiCanvas_PreviewStylusButtonDown(object sender, StylusButtonEventArgs e)
 {
     if (e.StylusButton.Name != "Barrel Switch")
     {
         return;
     }
     TegakiCanvas.EditingMode = InkCanvasEditingMode.Select;
 }
コード例 #3
0
 void Window1_StylusButtonDown(object sender, StylusButtonEventArgs e)
 {
     // <Snippet27>
     // Get tablet device that generated event
     //TabletDevice myTabletDevice = e.TabletDevice;
     //TabletDevice myTabletDevice = (TabletDevice) e.Device;
     // </Snippet27>
 }
コード例 #4
0
        private void StylusDebugWindow_StylusButtonDown(object sender, StylusButtonEventArgs e)
        {
            var str = "";

            str           += "Button : " + e.StylusButton.Name;
            str           += " GUID : " + e.StylusButton.Guid;
            EventsBox.Text = str;
        }
コード例 #5
0
        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);
        }
コード例 #6
0
ファイル: Window1.xaml.cs プロジェクト: ruo2012/samples-1
        // 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
            }
        }
コード例 #7
0
        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);
        }
コード例 #8
0
 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;
 }
コード例 #9
0
 /// <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();
     }
 }
コード例 #10
0
        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();
        }
コード例 #11
0
 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);
     }
 }
コード例 #12
0
ファイル: Window1.xaml.cs プロジェクト: zhimaqiao51/docs
        //</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);
        }
コード例 #13
0
        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;
        }
コード例 #14
0
        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;
        }
コード例 #15
0
ファイル: Window1.xaml.cs プロジェクト: zhimaqiao51/docs
        //</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;
            }
        }
コード例 #16
0
 /// <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();
     }
 }
コード例 #17
0
 void attachedElement_StylusButtonDown(object sender, StylusButtonEventArgs e)
 {
     e.Handled = true;
 }
コード例 #18
0
ファイル: TouchTest.xaml.cs プロジェクト: jithuin/infogeezer
 public static string ToText(this StylusButtonEventArgs e)
 {
     return(e.StylusButton.Name + e.StylusButton.StylusButtonState.ToString() + e.StylusDevice.ToText());
 }
コード例 #19
0
 private void statusWindow_StylusButtonDown(object sender, StylusButtonEventArgs e)
 {
     CloseIfComplete();
 }
コード例 #20
0
 private void InkCanvas_StylusButtonUp(object sender, StylusButtonEventArgs e)
 {
     GeneralButtonEventHandler(e, false);
 }
コード例 #21
0
ファイル: TouchTest.xaml.cs プロジェクト: jithuin/infogeezer
 private void cProbe_StylusButtonUp(object sender, StylusButtonEventArgs e)
 {
     DisplayEvent("StylusButtonUp", e.ToText());
 }
コード例 #22
0
 private void Window_PreviewStylusButtonDown(object sender, StylusButtonEventArgs e)
 {
     NewEvent("Window_PreviewStylusButtonDown");
 }
コード例 #23
0
 private void Window_StylusButtonUp(object sender, StylusButtonEventArgs e)
 {
     NewEvent("Window_StylusButtonUp");
 }
コード例 #24
0
 protected override void OnStylusButtonUp(StylusButtonEventArgs e)
 {
     base.OnStylusButtonUp(e);
 }
コード例 #25
0
 private void lvMnMAvanzado_StylusButtonDown(object sender, StylusButtonEventArgs e)
 {
     lvMnMAvanzado.SelectedItems.Clear();
 }
コード例 #26
0
 protected override void OnPreviewStylusButtonDown(StylusButtonEventArgs e)
 {
     base.OnPreviewStylusButtonDown(e);
 }
コード例 #27
0
 private void Button_StylusButtonDown(object sender, StylusButtonEventArgs e)
 {
 }
コード例 #28
0
 void attachedElement_PreviewStylusButtonDown(object sender, StylusButtonEventArgs e)
 {
     GenericStylusEventHandler(UIElement.PreviewStylusButtonDownEvent, UIElement.StylusButtonDownEvent, e,
                               new StylusButtonEventArgs(e.StylusDevice, e.Timestamp, e.StylusButton));
 }
コード例 #29
0
ファイル: Window1.xaml.cs プロジェクト: zhimaqiao51/docs
        //</Snippet14>

        //<Snippet13>
        void textbox1_PreviewStylusButtonDown(object sender, StylusButtonEventArgs e)
        {
            textbox1.AppendText(e.StylusButton.Name + "\n");
        }
コード例 #30
0
 private void InkCanvas_StylusButtonDown(object sender, StylusButtonEventArgs e)
 {
     GeneralButtonEventHandler(e, true);
 }