Пример #1
0
        private void OnDragDelta(DragDeltaEventArgs e)
        {
            AdjustWindowRectParameter swp = new AdjustWindowRectParameter();

            swp.InteractiveEdges = InteractiveEdges;
            swp.Delta            = new Vector(e.HorizontalChange, e.VerticalChange);

            MdiCommands.AdjustWindowRect.Execute(swp, this);
        }
Пример #2
0
        /// <summary>
        ///     Execute handler for the MdiCommands.AdjustWindowRect command.
        /// </summary>
        private void ExecuteAdjustWindowRect(ExecutedRoutedEventArgs e)
        {
            UIElement originalSource      = (UIElement)e.OriginalSource;
            AdjustWindowRectParameter swp = (AdjustWindowRectParameter)e.Parameter;

            MdiWindow window = Content as MdiWindow;

            Debug.Assert(window != null && MdiPanel.GetWindowState(window) == WindowState.Normal);

            Vector delta = originalSource.TransformElementToElement(swp.Delta, window);

            AdjustWindowRect(window, delta, swp.InteractiveEdges);
        }
        private void OnDragDelta(DragDeltaEventArgs e)
        {
            AdjustWindowRectParameter swp = new AdjustWindowRectParameter();
            swp.InteractiveEdges = InteractiveEdges;
            swp.Delta = new Vector(e.HorizontalChange, e.VerticalChange);

            MdiCommands.AdjustWindowRect.Execute(swp, this);
        }