void Open() { if (this._center == null || this._show == null) { return; } Cattach.SetIsVisible(this._center, true); if (this.UseShowAction) { Cattach.SetIsVisible(this._show, false); } Panel.SetZIndex(this, 1); }
void Close() { if (this._center == null || this._show == null) { return; } this.Dispatcher.BeginInvoke(DispatcherPriority.SystemIdle, new Action(() => { Cattach.SetIsVisible(this._center, false); if (this.UseShowAction) { Cattach.SetIsVisible(this._show, true); } Panel.SetZIndex(this, 0); })); this.IsExpanded = false; }
public FDrawer() { // Do :显示 { CommandBinding command = new CommandBinding(CommandService.Open, (l, k) => { Cattach.SetIsVisible(this._center, true); if (this.UseShowAction) { Cattach.SetIsVisible(this._show, false); } Panel.SetZIndex(this, 1); }); this.CommandBindings.Add(command); } // Do :隐藏 { CommandBinding command = new CommandBinding(CommandService.Close, (l, k) => { Cattach.SetIsVisible(this._center, false); if (this.UseShowAction) { Cattach.SetIsVisible(this._show, true); } Panel.SetZIndex(this, 0); }); this.CommandBindings.Add(command); } }
internal void Show(bool value) { Cattach.SetIsClose(this, value); }
internal void RefreshHide() { Cattach.SetIsVisible(this, !Cattach.GetIsVisible(this)); }
internal void Show(bool value) { var ss = Cattach.GetIsClose(this); Cattach.SetIsClose(this, value); }