private void HideLeft() { minerProfileLayer.Visibility = Visibility.Collapsed; BtnMinerProfileGrip.Visibility = Visibility.Visible; PinRotateTransform.Angle = 90; mainLayer.ColumnDefinitions.Remove(_mainLayerColumn0); MainArea.SetValue(Grid.ColumnProperty, mainLayer.ColumnDefinitions.Count - 1); }
// 打开左侧抽屉 private void CloseLeftDrawer() { if (leftDrawer.Visibility == Visibility.Collapsed) { return; } leftDrawer.Visibility = Visibility.Collapsed; this.ShowLeftDrawerGrid(); PinRotateTransform.Angle = 90; mainLayer.ColumnDefinitions.Remove(MinerProfileColumn); MainArea.SetValue(Grid.ColumnProperty, mainLayer.ColumnDefinitions.Count - 1); }
private void ToogleLeft() { if (BtnMinerProfileGrip.Visibility == Visibility.Collapsed) { HideLeft(); } else { BtnMinerProfileGrip.Visibility = Visibility.Collapsed; PinRotateTransform.Angle = 0; mainLayer.ColumnDefinitions.Insert(0, _mainLayerColumn0); MainArea.SetValue(Grid.ColumnProperty, mainLayer.ColumnDefinitions.Count - 1); } }
// 关闭左侧抽屉 private void OpenLeftDrawer() { if (LeftDrawerGrip.Width != _leftDrawerGripWidth) { return; } leftDrawer.Visibility = Visibility.Visible; this.HideLeftDrawerGrid(); PinRotateTransform.Angle = 0; if (!mainLayer.ColumnDefinitions.Contains(MinerProfileColumn)) { mainLayer.ColumnDefinitions.Insert(0, MinerProfileColumn); } MainArea.SetValue(Grid.ColumnProperty, mainLayer.ColumnDefinitions.Count - 1); }