コード例 #1
0
        /// <summary>
        /// Raises the <see cref="E:System.Windows.Forms.Control.MouseWheel"/> event.
        /// </summary>
        /// <param name="e">
        /// A <see cref="T:System.Windows.Forms.MouseEventArgs"/> that contains the event data.
        /// </param>
        protected override void OnMouseWheel(MouseEventArgs e)
        {
            base.OnMouseWheel(e);
            bool isControlDown = ModifierKeys == Keys.Control;
            var  m             = new ZoomStepManipulator(this, e.Delta * 0.001, isControlDown);

            m.Started(new ManipulationEventArgs(ConverterExtensions.ToScreenPoint(e.Location)));
        }
コード例 #2
0
 /// <summary>
 /// Creates the manipulation event args.
 /// </summary>
 /// <param name="e">
 /// The MouseEventArgs instance containing the event data.
 /// </param>
 /// <returns>
 /// A manipulation event args object.
 /// </returns>
 ManipulationEventArgs CreateManipulationEventArgs(MouseEventArgs e)
 {
     return(new ManipulationEventArgs(ConverterExtensions.ToScreenPoint(e.Location)));
 }