private void TouchFeedbackStatus(bool enable) { Stylus.SetIsTouchFeedbackEnabled(this, enable); Stylus.SetIsTapFeedbackEnabled(this, enable); Stylus.SetIsPressAndHoldEnabled(this, enable); Cursor = enable ? Cursors.Arrow : Cursors.None; }
private void TouchFeedbackSnippets() { //<Snippet8> Stylus.SetIsTouchFeedbackEnabled(inkCanvas1, true); //</Snippet8> //<Snippet7> bool touchFeedbackEnabled = Stylus.GetIsTouchFeedbackEnabled(inkCanvas1); //</Snippet7> }
public MainWindow() { InitializeComponent(); if (System.Windows.Forms.Screen.AllScreens.Length >= 2) { screen0 = System.Windows.Forms.Screen.AllScreens[0].Bounds; screen1 = System.Windows.Forms.Screen.AllScreens[1].Bounds; STATICS.SCREEN_WIDTH = screen0.Width; STATICS.SCREEN_HEIGHT = screen0.Height; STATICS.SCREEN_NUM = 2; System.Drawing.Rectangle screenBounds = System.Windows.Forms.Screen.AllScreens[0].Bounds; this.Left = screenBounds.Left; this.Top = screenBounds.Top; InitializeCloudView(); } else { STATICS.SCREEN_WIDTH = (int)SystemParameters.PrimaryScreenWidth; STATICS.SCREEN_HEIGHT = (int)SystemParameters.PrimaryScreenHeight; STATICS.SCREEN_NUM = 1; //STATICS.DEAULT_CARD_SIZE = new Size(0.08333 * STATICS.SCREEN_WIDTH, 0.11111 * STATICS.SCREEN_HEIGHT); //STATICS.DEAULT_CARD_SIZE_WITH_BORDER = new Size(0.08333 * STATICS.SCREEN_WIDTH + 5, 0.11111 * STATICS.SCREEN_HEIGHT + 5); this.Width = STATICS.SCREEN_WIDTH; this.Height = STATICS.SCREEN_HEIGHT; this.WindowState = System.Windows.WindowState.Maximized; this.Left = 0; } boundary = new Rect(0, 0, STATICS.SCREEN_WIDTH, STATICS.SCREEN_HEIGHT); Stylus.SetIsPressAndHoldEnabled(this, false); Stylus.SetIsTapFeedbackEnabled(this, false); Stylus.SetIsFlicksEnabled(this, false); Stylus.SetIsTouchFeedbackEnabled(this, false); this.Loaded += Window_Loaded; Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 28 }); controlWindow = new Control_Window(this); controlWindow.Show(); this.Visibility = Visibility.Hidden; this.KeyDown += MainWindow_KeyDown; }
void Win7TouchVeMapLoaded(object sender, RoutedEventArgs e) { if (!Handler.DigitizerCapabilities.IsMultiTouchReady) { return; } //the current window is not available during construction, so the current window will haved to be obtained in another event, such as loaded Window parentWindow = Window.GetWindow(this); Factory.EnableStylusEvents(parentWindow); Stylus.SetIsPressAndHoldEnabled(this, true); Stylus.SetIsFlicksEnabled(this, false); Stylus.SetIsTapFeedbackEnabled(this, true); Stylus.SetIsTouchFeedbackEnabled(this, true); _manipulationProcessor = new ManipulationInertiaProcessor(ProcessorManipulations.ALL, Factory.CreateTimer()); _manipulationProcessor.BeforeInertia += ManipulationProcessorBeforeInertia; _manipulationProcessor.ManipulationDelta += ManipulationProcessorManipulationDelta; }