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; }
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); }
public DragGridPanel(LayoutDefinition layout) : this() { Layout = layout; }