Beispiel #1
0
        private void XpanderPanelPanelStyleChanged(object sender, PanelStyleChangeEventArgs e)
        {
            PanelStyle panelStyle = e.PanelStyle;

            if (panelStyle != m_ePanelStyle)
            {
                PanelStyle = panelStyle;
            }
        }
Beispiel #2
0
        protected virtual void OnPanelStyleChanged(object sender, PanelStyleChangeEventArgs e)
        {
            switch (e.PanelStyle)
            {
            case PanelStyle.Default:
                m_panelColors = new PanelColors(this);
                break;

            case PanelStyle.Office2007:
                m_panelColors = new PanelColorsOffice2007Blue(this);
                break;
            }
            Invalidate(invalidateChildren: true);
            if (this.PanelStyleChanged != null)
            {
                this.PanelStyleChanged(sender, e);
            }
        }
Beispiel #3
0
        protected virtual void OnPanelStyleChanged(object sender, PanelStyleChangeEventArgs e)
        {
            PanelStyle panelStyle = e.PanelStyle;

            base.Padding = new Padding(0);
            foreach (XPanderPanel xPanderPanel in XPanderPanels)
            {
                PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(xPanderPanel);
                if (properties.Count > 0)
                {
                    properties["PanelStyle"]?.SetValue(xPanderPanel, panelStyle);
                    properties["Left"]?.SetValue(xPanderPanel, base.Padding.Left);
                    properties["Width"]?.SetValue(xPanderPanel, base.ClientRectangle.Width - base.Padding.Left - base.Padding.Right);
                }
            }
            if (this.PanelStyleChanged != null)
            {
                this.PanelStyleChanged(sender, e);
            }
        }
Beispiel #4
0
 protected override void OnPanelStyleChanged(object sender, PanelStyleChangeEventArgs e)
 {
     OnLayout(new LayoutEventArgs(this, null));
     base.OnPanelStyleChanged(sender, e);
 }