protected override void OnMouseWheel(MouseWheelEventArgs e)
        {
            e.Handled = true;

            Point center = e.GetPosition(cardsView);

            var mess = new MouseWheelTableZoom(e.Delta,center);
            Messenger.Default.Send(mess);

            base.OnMouseWheel(e);
        }
Exemple #2
0
        protected override void OnMouseWheel(MouseWheelEventArgs e)
        {
            e.Handled = true;

            Point center = e.GetPosition(cardsView);

            var mess = new MouseWheelTableZoom(e.Delta, center);

            Messenger.Default.Send(mess);

            base.OnMouseWheel(e);
        }
Exemple #3
0
        internal void OnMouseWheelTableZoom(MouseWheelTableZoom e)
        {
            double oldZoom = Zoom; // May be animated

            // Set the new zoom level
            if (e.Delta > 0)
            {
                Zoom = oldZoom + 0.125;
            }
            else if (oldZoom > 0.15)
            {
                Zoom = oldZoom - 0.125;
            }

            // Adjust the offset to center the zoom on the mouse pointer
            //double ratio = oldZoom - Zoom;
            //Offset += new Vector(e.Center.X * ratio, e.Center.Y * ratio);
        }
Exemple #4
0
        internal void OnMouseWheelTableZoom(MouseWheelTableZoom e)
        {
            double oldZoom = Zoom; // May be animated

            // Set the new zoom level
            if (e.Delta > 0)
                Zoom = oldZoom + 0.125;
            else if (oldZoom > 0.15)
                Zoom = oldZoom - 0.125;

            // Adjust the offset to center the zoom on the mouse pointer
            //double ratio = oldZoom - Zoom;
            //Offset += new Vector(e.Center.X * ratio, e.Center.Y * ratio);
        }