public Window1() : base() { InitializeComponent(); inkCanvas1.StylusSystemGesture += new StylusSystemGestureEventHandler(inkCanvas1_StylusSystemGesture); //<Snippet2> Stylus.SetIsFlicksEnabled(canvas1, false); //</Snippet2> //<Snippet4> Stylus.SetIsTapFeedbackEnabled(canvas1, false); //</Snippet4> //<Snippet5> bool tapFeedbackEnabled = Stylus.GetIsTapFeedbackEnabled(canvas1); //</Snippet5> //<Snippet6> bool flicksEnabled = Stylus.GetIsFlicksEnabled(canvas1); //</Snippet6> canvas1.StylusSystemGesture += new StylusSystemGestureEventHandler(canvas1_StylusSystemGesture); }
public AwesomeButton() { InitializeComponent(); Stylus.SetIsPressAndHoldEnabled(this, false); Stylus.SetIsFlicksEnabled(this, false); this.MouseEnter += AwesomeButton_MouseEnter; this.MouseLeave += AwesomeButton_MouseLeave; this.PreviewMouseDown += AwesomeButton_PreviewMouseDown; this.PreviewMouseUp += AwesomeButton_PreviewMouseUp; this.TouchDown += AwesomeButton_TouchDown; this.TouchUp += AwesomeButton_TouchUp; this.Loaded += AwesomeButton_Loaded; }
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; }