Example #1
0
 private void OnKeyDown(object sender, KeyEventArgs keyEventArgs)
 {
     switch (keyEventArgs.Key)
     {
     case Key.Escape:
         this.KeyDown -= OnKeyDown;
         _interactionManager.GetCommand <SSSelectionRegionProvider>().Publish(new SSPayload <Tuple <bool, Point, Point> >(new Tuple <bool, Point, Point>(false, default(Point), default(Point))));
         Close();
         break;
     }
 }
Example #2
0
 protected override void OnPreviewMouseLeftButtonUp(MouseButtonEventArgs e)
 {
     base.OnPreviewMouseLeftButtonUp(e);
     _interactionManager.GetCommand <SSSelectionRegionProvider>().Publish(new SSPayload <Tuple <bool, Point, Point> >(new Tuple <bool, Point, Point>(true, _start.Value, _end.Value)));
 }