Example #1
0
        /// <summary>
        /// Sets the PanelStyle in the given control collection.
        /// </summary>
        /// <param name="controls">a collection of child controls</param>
        /// <param name="panelStyle">Style of the panel</param>
        public static void SetPanelProperties(Control.ControlCollection controls, BaseControls.XPander.PanelStyle panelStyle)
        {
            ArrayList panels = FindPanels(true, controls);

            if (panels != null)
            {
                foreach (BaseControls.XPander.BasePanel panel in panels)
                {
                    panel.PanelStyle = panelStyle;
                }
            }
        }
Example #2
0
        /// <summary>
        /// Sets the PanelStyle and PanelColors table in the given control collection.
        /// </summary>
        /// <param name="controls">a collection of child controls</param>
        /// <param name="panelStyle">Style of the panel</param>
        /// <param name="panelColors">The PanelColors table</param>
        public static void SetPanelProperties(Control.ControlCollection controls, BaseControls.XPander.PanelStyle panelStyle, BaseControls.XPander.PanelColors panelColors)
        {
            if (panelColors == null)
            {
                throw new ArgumentNullException("panelColors",
                                                string.Format(System.Globalization.CultureInfo.InvariantCulture,
                                                              BaseControls.Properties.Resources.IDS_ArgumentException,
                                                              "panelColors"));
            }

            ArrayList panels = FindPanels(true, controls);

            foreach (BaseControls.XPander.BasePanel panel in panels)
            {
                panel.PanelStyle  = panelStyle;
                panelColors.Panel = panel;
                panel.SetPanelProperties(panelColors);
            }
        }