Example #1
0
        public Form1()
        {
            InitializeComponent();

            Game.GameManager.PropertyChanged += new Action<Game.GameProperties>(PropertyChanged);
            SharpWoW.Controls.ExpanderControl exp = new SharpWoW.Controls.ExpanderControl();
            exp.Host.Child = uiPanel1;
            elementHost1.Child = exp;
            panel1.MouseEnter += (sender, args) => { if(exp.IsStatic == false) exp.Collapse(); };
            menuStrip1.MouseEnter += (sender, args) => { if (exp.IsStatic == false) exp.Collapse(); };
            statusStrip1.MouseEnter += (sender, args) => { if (exp.IsStatic == false) exp.Collapse(); };

            exp.ExpandedChanged += (expanded) =>
                {
                    if (expanded)
                    {
                        elementHost1.Width = 360;
                    }
                    else
                    {
                        elementHost1.Width = 31;
                    }
                };
        }
Example #2
0
        public Form1()
        {
            InitializeComponent();

            Game.GameManager.PropertyChanged += new Action <Game.GameProperties>(PropertyChanged);
            SharpWoW.Controls.ExpanderControl exp = new SharpWoW.Controls.ExpanderControl();
            exp.Host.Child     = uiPanel1;
            elementHost1.Child = exp;
            panel1.MouseEnter += (sender, args) => { if (exp.IsStatic == false)
                                                     {
                                                         exp.Collapse();
                                                     }
            };
            menuStrip1.MouseEnter += (sender, args) => { if (exp.IsStatic == false)
                                                         {
                                                             exp.Collapse();
                                                         }
            };
            statusStrip1.MouseEnter += (sender, args) => { if (exp.IsStatic == false)
                                                           {
                                                               exp.Collapse();
                                                           }
            };

            exp.ExpandedChanged += (expanded) =>
            {
                if (expanded)
                {
                    elementHost1.Width = 360;
                }
                else
                {
                    elementHost1.Width = 31;
                }
            };
        }