コード例 #1
0
ファイル: PlotView.cs プロジェクト: choenden/oxyplot
 /// <summary>
 /// Called on KeyPress event.
 /// </summary>
 /// <param name="args">An instance that contains the event data.</param>
 protected override void OnKeyPressed(KeyEventArgs args)
 {
     base.OnKeyPressed(args);
     if (args.Handled)
     {
         return;
     }
     args.Handled = ActualController.HandleKeyDown(this,
                                                   args.ToOxyKeyEventArgs());
 }
コード例 #2
0
        protected override bool OnKey(SciterElement se, SciterXBehaviors.KEY_PARAMS prms)
        {
            if (prms.cmd == (uint)SciterXBehaviors.KEY_EVENTS.KEY_DOWN)
            {
                Keys key = (Keys)prms.key_code;

                var args = new OxyKeyEventArgs {
                    ModifierKeys = prms.alt_state.GetModifiers(), Key = key.Convert()
                };
                return(ActualController.HandleKeyDown(this, args));
            }
            return(false);
        }
コード例 #3
0
        /// <summary>
        /// Called before the <see cref="E:System.Windows.UIElement.KeyDown" /> event occurs.
        /// </summary>
        /// <param name="e">The data for the event.</param>
        protected override void OnKeyDown(KeyEventArgs e)
        {
            base.OnKeyDown(e);
            if (e.Handled)
            {
                return;
            }

            var args = new OxyKeyEventArgs {
                ModifierKeys = e.Modifiers.ToModifierKeys(), Key = e.Key.Convert()
            };

            e.Handled = ActualController.HandleKeyDown(this, args);
        }