Example #1
0
 public MainWindow()
 {
     InitializeComponent();
     _captureElement = this;
     Mouse.AddGotMouseCaptureHandler((DependencyObject)_captureElement, stackPanel1_GotLostMouseCapture);
     Mouse.AddLostMouseCaptureHandler((DependencyObject)_captureElement, stackPanel1_GotLostMouseCapture);
     Mouse.Capture(_captureElement);
     MouseCaptured = Mouse.Captured != null;
 }
Example #2
0
 private void CalendarHelper_Loaded(object sender, RoutedEventArgs e)
 {
     Mouse.AddGotMouseCaptureHandler(Target, GlobalMouseCapture);
 }