protected virtual void OnKeyboardStartZoom(KeyRoutedEventArgs e) { var f = IsCtrlKeyPressed() ? 0.25f : 1; switch (e.Key) { case VirtualKey.PageUp: OnAddZoomForce?.Invoke(Viewport, new AddForceEventArgs(new Vector2(-0.1f * f * (float)Viewport.PageUpDownZoomSensitivity, 0))); e.Handled = true; break; case VirtualKey.PageDown: OnAddZoomForce?.Invoke(Viewport, new AddForceEventArgs(new Vector2(0.1f * f * (float)Viewport.PageUpDownZoomSensitivity, 0))); e.Handled = true; break; case VirtualKey.Back: OnRestoreCameraSettings?.Invoke(Viewport, EventArgs.Empty); e.Handled = true; break; } }
protected void RaiseOnAddZoomForce(AddForceEventArgs args) { OnAddZoomForce?.Invoke(Viewport, args); }