Exemple #1
0
        private void panel_Maximized(object sender, EventArgs e)
        {
            if (e.Equals(EventArgs.Empty))
            {
                return;
            }

            if (!_isMaximized)
            {
                _restoredLayout = Layout;
                Layout          = CreateMaximizedLayout();
                //RestorePanel(sender as DragDockPanel);.......TBRemoved

                foreach (UIElement child in Children)
                {
                    if (child != sender && child is DragDockPanel)
                    {
                        ((DragDockPanel)child).PanelState = PanelState.Minimized;
                    }
                }
                UpdateLayout();
            }


            int index = GetIndex((UIElement)sender);

            _restoredIndex = index;

            ExchangeIndexes((UIElement)sender, index, 0);

            _isMaximized = true;
        }
Exemple #2
0
        private void OnLayoutChanged(LayoutDefinition newValue, LayoutDefinition oldValue)
        {
            if (_isMaximized)
            {
                foreach (UIElement child in Children)
                {
                    if (child is DragDockPanel)
                    {
                        ((DragDockPanel)child).PanelState = PanelState.Restored;
                    }
                }
                _isMaximized = false;
            }

            OnCellsChanged(
                (newValue != null) ? newValue.Cells : null,
                (oldValue != null) ? oldValue.Cells : null);
            OnDefinitionsChanged(
                (newValue != null) ? newValue.Definitions : null,
                (oldValue != null) ? oldValue.Definitions : null);
        }
Exemple #3
0
 public DragGridPanel(LayoutDefinition layout) : this()
 {
     Layout = layout;
 }