コード例 #1
0
        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);
        }
コード例 #2
0
        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;
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 internal void Show(bool value)
 {
     Cattach.SetIsClose(this, value);
 }
コード例 #5
0
 internal void RefreshHide()
 {
     Cattach.SetIsVisible(this, !Cattach.GetIsVisible(this));
 }
コード例 #6
0
 internal void Show(bool value)
 {
     var ss = Cattach.GetIsClose(this);
     Cattach.SetIsClose(this, value);
 }