/// <summary>
        /// create the controls for VSB
        /// </summary>
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadStatusStrip statusBar = new RadStatusStrip();

            statusBar.AutoSize = false;
            statusBar.Size     = new Size(200, 27);
            statusBar.Text     = "RadStatusStrip";

            RadItem separatorItem = new RadToolStripSeparatorItem();

            statusBar.Items.Add(separatorItem);

            RadStatusStrip statusBarStructure = new RadStatusStrip();

            statusBarStructure.AutoSize = false;
            statusBarStructure.Size     = new Size(200, 27);

            RadItem structureSeparatorItem = new RadToolStripSeparatorItem();

            statusBarStructure.Items.Add(structureSeparatorItem);

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(statusBar, statusBarStructure.RootElement);

            designed.MainElementClassName = typeof(RadStatusBarElement).FullName;
            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }
示例#2
0
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadTabStrip tabStrip = new RadTabStrip();

            tabStrip.Bounds = new System.Drawing.Rectangle(30, 30, 300, 50);

            tabStrip.TabStripElement.Bounds = new System.Drawing.Rectangle(0, 0, 298, 50);

            tabStrip.TabStripElement.Items.Add(new TabItem("TabItem1"));
            tabStrip.TabStripElement.Items.Add(new TabItem("TabItem2"));
            tabStrip.TabStripElement.Items.Add(new TabItem("TabItem3"));

            RadTabStrip tabStripStructure = new RadTabStrip();

            tabStripStructure.TabStripElement.Items.Add(new TabItem("Tab Item Text"));

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(tabStrip, tabStripStructure.RootElement);

            designed.MainElementClassName = typeof(RadTabStripElement).FullName;
            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(Control previewSurface)
        {
            RadCarousel carousel = new RadCarousel();

            carousel.Size = new Size(320, 240);

            carousel.Text = "RadCarousel";

            RadCarousel carouselStructure = new RadCarousel();

            carouselStructure.AutoSize = true;

            carouselStructure.Text = "RadCarousel";
            carouselStructure.Size = new Size(320, 240);

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(carousel, carouselStructure.RootElement);

            designed.MainElementClassName = typeof(RadCarouselElement).FullName;

            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }
示例#4
0
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadPanelBar pane = new RadPanelBar();

            pane.GroupStyle = PanelBarStyles.OutlookNavPane;

            RadPanelBarGroupElement group  = new RadPanelBarGroupElement();
            RadPanelBarGroupElement group1 = new RadPanelBarGroupElement();
            RadPanelBarGroupElement group2 = new RadPanelBarGroupElement();
            RadPanelBarGroupElement group3 = new RadPanelBarGroupElement();

            pane.Items.Add(group);
            pane.Items.Add(group1);
            pane.Items.Add(group2);
            pane.Items.Add(group3);
            pane.Size = new Size(200, 220);

            OutlookStyle outlookStyle = pane.PanelBarElement.CurrentStyle as OutlookStyle;

            if (outlookStyle != null)
            {
                outlookStyle.ShowFewerButtons();
                outlookStyle.ShowFewerButtons();
            }

            ControlStyleBuilderInfoList controlStyleBuilderInfoList   = new ControlStyleBuilderInfoList();
            ControlStyleBuilderInfo     designControlStyleBuilderInfo = new ControlStyleBuilderInfo(pane, pane.RootElement);

            designControlStyleBuilderInfo.MainElementClassName = typeof(RadPanelBarElement).FullName;
            controlStyleBuilderInfoList.Add(designControlStyleBuilderInfo);
            return(controlStyleBuilderInfoList);
        }
示例#5
0
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadListBox listBoxStructure = new RadListBox();

            listBoxStructure.Virtualized = false;
            listBoxStructure.Size        = new Size(200, 130);
            listBoxStructure.Items.Add(CreateSampleItem());

            RadListBox listBox = new RadListBox();

            listBox.Virtualized = false;
            listBox.Size        = new Size(200, 130);
            listBox.Items.Add(CreateSampleItem());

            string itemText;

            for (int i = 1; i <= 10; i++)
            {
                itemText = string.Format("Item{0}", i);
                listBox.Items.Add(new RadListBoxItem(itemText));
            }

            string longItemText = "Some text to make the horizontal scroll appear";

            listBox.Items.Add(new RadListBoxItem(longItemText));

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(listBox, listBoxStructure.RootElement);

            designed.MainElementClassName = typeof(RadListBoxElement).FullName;
            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }
示例#6
0
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadButton button = new RadButton();

            //button.AutoSize = false;
            button.Size = new Size(120, 65);

            button.Text = "RadButton";

            RadButton buttonStructure = new RadButton();

            //button.AutoSize = true;

            buttonStructure.Text = "RadButton";

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(button, buttonStructure.RootElement);

            designed.MainElementClassName = typeof(RadButtonElement).FullName;

            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }
示例#7
0
        /// <summary>
        /// Creates and initializes the structure and preview controls in the visual style builder
        /// </summary>
        /// <param name="previewSurface"></param>
        /// <returns></returns>
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadRadioButton button = new RadRadioButton();

            button.AutoSize    = true;
            button.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On;

            button.Text = "RadRadioButton";
            button.Size = new Size(120, 20);

            RadRadioButton buttonStructure = new RadRadioButton();

            button.AutoSize = true;

            buttonStructure.Text = "RadRadioButton";

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(button, buttonStructure.RootElement);

            designed.MainElementClassName = typeof(RadRadioButtonElement).FullName;
            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }
示例#8
0
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(Control previewSurface)
        {
            RadProgressBar progressBar = new RadProgressBar();

            progressBar.Size   = new Size(300, 40);
            progressBar.Value1 = 66;
            progressBar.Value2 = 33;
            ControlStyleBuilderInfoList styleBuilderInfoList = new ControlStyleBuilderInfoList();
            ControlStyleBuilderInfo     designed             = new ControlStyleBuilderInfo(progressBar, progressBar.RootElement);

            designed.MainElementClassName = typeof(RadProgressBarElement).FullName;
            styleBuilderInfoList.Add(designed);

            return(styleBuilderInfoList);
        }
示例#9
0
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(Control previewSurface)
        {
            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();
            Rectangle editorBounds          = new Rectangle(0, 0, 186, 24);
            Rectangle popupBounds           = new Rectangle(0, 0, 200, 80);

            // DateTimePicker
            RadDateTimePicker radDateTimePickerPreview = new RadDateTimePicker();

            radDateTimePickerPreview.Text   = "RadDropDown";
            radDateTimePickerPreview.Bounds = editorBounds;
            // TODO: remove this PATCH!!!
            radDateTimePickerPreview.LayoutManager.UpdateLayout();

            RadDateTimePicker radDateTimePickerStructure = new RadDateTimePicker();

            radDateTimePickerStructure.Bounds = editorBounds;

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(radDateTimePickerPreview, radDateTimePickerStructure.RootElement);

            designed.Placemenet           = PreviewControlPlacemenet.MiddleCenter;
            designed.MainElementClassName = typeof(RadDateTimePickerElement).FullName;
            res.Add(designed);

            // Popup panel
            //ComboBoxPopupControl popupPanelPreview = new ComboBoxPopupControl();
            RadDateTimePickerDropDown popupPanelPreview = new RadDateTimePickerDropDown(null);

            RadCalendar calendar = new RadCalendar();

            calendar.Bounds = popupBounds;

            popupPanelPreview.HostedControl = calendar;
            popupPanelPreview.Bounds        = popupBounds;
            //popupPanelPreview.PreviewMode = true;

            RadDateTimePickerDropDown popupPanelStructure = new RadDateTimePickerDropDown(null);

            popupPanelStructure.HostedControl = new RadCalendar();
            popupPanelStructure.Bounds        = popupBounds;


            designed            = new ControlStyleBuilderInfo(popupPanelPreview, popupPanelStructure.RootElement);
            designed.Placemenet = PreviewControlPlacemenet.ParentBottomLeft;
            res.Add(designed);

            return(res);
        }
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(Control previewSurface)
        {
            RadOffice2007ScreenTip screenTip = new RadOffice2007ScreenTip();

            RadOffice2007ScreenTip screenTipStructure = new RadOffice2007ScreenTip();

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(screenTip, screenTipStructure.RootElement);

            designed.MainElementClassName = typeof(RadOffice2007ScreenTipElement).FullName;

            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }
示例#11
0
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(Control previewSurface)
        {
            RadTitleBar titleBarPreview = new RadTitleBar();

            titleBarPreview.Text   = "RadTitleBar";
            titleBarPreview.Bounds = new Rectangle(30, 30, 300, 26);

            RadTitleBar titleBarStructure = new RadTitleBar();

            titleBarStructure.Text = "RadTitleBar";

            ControlStyleBuilderInfo     designed = new ControlStyleBuilderInfo(titleBarPreview, titleBarStructure.RootElement);
            ControlStyleBuilderInfoList res      = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            ControlStyleBuilderInfoList result = new ControlStyleBuilderInfoList();

            RadScrollablePanel panelPreview = new RadScrollablePanel();

            panelPreview.Size = new System.Drawing.Size(450, 450);


            RadScrollablePanel panelStructure = new RadScrollablePanel();

            panelStructure.Size = new System.Drawing.Size(450, 450);

            ControlStyleBuilderInfo info = new ControlStyleBuilderInfo(panelPreview, panelStructure.RootElement);

            result.Add(info);

            return(result);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="previewSurface"></param>
        /// <returns></returns>
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(Control previewSurface)
        {
            QuickNavigator previewNavigator = new QuickNavigator();
            Size           size             = previewNavigator.GetPreferredSize();

            previewNavigator.Bounds = new Rectangle(Point.Empty, size);

            QuickNavigator elementStructureNavigator = new QuickNavigator();

            size = elementStructureNavigator.GetPreferredSize();
            elementStructureNavigator.Bounds = new Rectangle(Point.Empty, size);

            ControlStyleBuilderInfo     navigatorDesignData = new ControlStyleBuilderInfo(previewNavigator, elementStructureNavigator.RootElement);
            ControlStyleBuilderInfoList list = new ControlStyleBuilderInfoList();

            list.Add(navigatorDesignData);

            return(list);
        }
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(Control previewSurface)
        {
            RadVScrollBar scrollBarPreview = new RadVScrollBar();

            scrollBarPreview.Value     = 50;
            scrollBarPreview.ThemeName = "";
            scrollBarPreview.Bounds    = new Rectangle(0, 0, 20, 100);

            RadVScrollBar scrollBarStructure = new RadVScrollBar();

            scrollBarStructure.Bounds = new Rectangle(0, 0, 20, 100);

            ControlStyleBuilderInfo     designed = new ControlStyleBuilderInfo(scrollBarPreview, scrollBarStructure.RootElement);
            ControlStyleBuilderInfoList res      = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }
示例#15
0
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadTreeView tree = new RadTreeView();

            tree.Nodes.Add(new RadTreeNode("Node1"));
            tree.Nodes[0].Nodes.Add(new RadTreeNode("Node2"));
            tree.Nodes[0].Nodes.Add(new RadTreeNode("Node3"));
            tree.Nodes[0].Nodes.Add(new RadTreeNode("Node4"));
            tree.Nodes[0].Nodes.Add(new RadTreeNode("Node5"));


            RadBreadCrumb radBreadCrumb = new RadBreadCrumb();

            radBreadCrumb.Size     = new System.Drawing.Size(200, 50);
            radBreadCrumb.AutoSize = true;

            radBreadCrumb.Text = "breadCrumb";

            RadBreadCrumb breadCrumbStructure = new RadBreadCrumb();

            breadCrumbStructure.Size     = new System.Drawing.Size(200, 50);
            breadCrumbStructure.AutoSize = true;

            breadCrumbStructure.Text = "breadCrumb";

            radBreadCrumb.DefaultTreeView       = tree;
            breadCrumbStructure.DefaultTreeView = tree;

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(radBreadCrumb, breadCrumbStructure.RootElement);

            designed.MainElementClassName = typeof(RadBreadCrumbElement).FullName;

            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            tree.SelectedNode = tree.Nodes[0].Nodes[2];

            res.Add(designed);

            return(res);
        }
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadForm radFormPreview = new RadForm();

            radFormPreview.Behavior.DisableMouseEvents = true;
            radFormPreview.Size       = new Size(320, 240);
            radFormPreview.AutoScroll = true;

            System.Windows.Forms.Button btn = new System.Windows.Forms.Button();
            btn.Location = new Point(3000, 3000);

            radFormPreview.Controls.Add(btn);
            radFormPreview.Text = "RadForm";

            radFormPreview.Anchor =
                System.Windows.Forms.AnchorStyles.Bottom
                | System.Windows.Forms.AnchorStyles.Left
                | System.Windows.Forms.AnchorStyles.Right
                | System.Windows.Forms.AnchorStyles.Top;

            RadForm radFormStructure = new RadForm();

            radFormStructure.AutoSize = true;

            radFormStructure.Text = "RadForm";
            radFormStructure.Size = new Size(320, 240);

            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(radFormPreview, radFormStructure.RootElement);

            designed.MainElementClassName = radFormStructure.FormElement.GetThemeEffectiveType().FullName;
            designed.ExcludeStructureElementsAndHierarchy.Add(radFormStructure.FormElement.TitleBar);
            designed.ExcludeStructureElementsAndHierarchy.Add(radFormStructure.FormElement.HorizontalScrollbar);
            designed.ExcludeStructureElementsAndHierarchy.Add(radFormStructure.FormElement.VerticalScrollbar);
            res.Add(designed);

            return(res);
        }
        /// <summary>
        /// Method is required by Visual Style Builder.
        /// </summary>
        /// <param name="previewSurface"></param>
        /// <returns>theme designed controls</returns>
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(Control previewSurface)
        {
            RadGroupBox groupBox = new RadGroupBox();

            groupBox.Size = new Size(250, 250);

            groupBox.Text       = "Header Text";
            groupBox.FooterText = "Footer Text";

            RadGroupBox groupBoxStructure = new RadGroupBox();

            groupBoxStructure.Text       = "Header Text";
            groupBoxStructure.FooterText = "Footer Text";

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(groupBox, groupBoxStructure.RootElement);

            designed.MainElementClassName = typeof(RadGroupBoxElement).FullName;
            ThemeDesignedControlList res = new ThemeDesignedControlList();

            res.Add(designed);
            return(res);
        }
示例#18
0
        /// <summary>
        /// Initializes the controls which will appear in the VSBuilder
        /// </summary>
        /// <param name="previewSurface"></param>
        /// <returns></returns>
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadTextBox textbox = new RadTextBox();

            textbox.Text   = "RadTextBox";
            textbox.Bounds = new System.Drawing.Rectangle(0, 0, 100, 15);

            RadTextBox textboxStructure = new RadTextBox();

            textboxStructure.Bounds = new System.Drawing.Rectangle(0, 0, 100, 15);
            textboxStructure.Text   = "RadTextBox";

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(textbox, textboxStructure.RootElement);

            designed.MainElementClassName = typeof(RadTextBoxElement).FullName;
            designed.Placemenet           = PreviewControlPlacemenet.MiddleCenter;

            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            res.Add(designed);
            return(res);
        }
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadTrackBar trackBar = new RadTrackBar();

            trackBar.Bounds = new System.Drawing.Rectangle(0, 0, 150, 30);

            trackBar.TrackBarElement.Bounds = new System.Drawing.Rectangle(0, 0, 150, 30);

            RadTrackBar trackBarStructure = new RadTrackBar();

            trackBarStructure.Bounds = new System.Drawing.Rectangle(0, 0, 150, 30);

            trackBarStructure.TrackBarElement.Bounds = new System.Drawing.Rectangle(0, 0, 150, 30);

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(trackBar, trackBarStructure.RootElement);

            designed.MainElementClassName = typeof(RadTrackBarElement).FullName;
            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadRibbonForm radRibbonFormPreview = new RadRibbonForm();

            radRibbonFormPreview.Size = new Size(320, 240);
            RadRibbonBar ribbonbar = new RadRibbonBar();

            ribbonbar.Dock    = System.Windows.Forms.DockStyle.Top;
            ribbonbar.Enabled = false;
            radRibbonFormPreview.Controls.Add(ribbonbar);

            radRibbonFormPreview.Text = "RadRibbonForm";

            radRibbonFormPreview.Anchor =
                System.Windows.Forms.AnchorStyles.Bottom
                | System.Windows.Forms.AnchorStyles.Left
                | System.Windows.Forms.AnchorStyles.Right
                | System.Windows.Forms.AnchorStyles.Top;
            radRibbonFormPreview.AllowAero = false;

            RadRibbonForm radRibbonFormStructure = new RadRibbonForm();

            radRibbonFormStructure.AutoSize = true;

            radRibbonFormStructure.Text = "RadRibbonForm";
            radRibbonFormStructure.Size = new Size(320, 240);

            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(radRibbonFormPreview, radRibbonFormStructure.RootElement);

            designed.MainElementClassName = radRibbonFormStructure.FormElement.GetThemeEffectiveType().FullName;

            res.Add(designed);

            return(res);
        }
示例#21
0
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(Control previewSurface)
        {
            RadLabel label = new RadLabel();

            label.Text     = "RadLabel";
            label.Size     = new Size(200, 50);
            label.AutoSize = true;

            RadLabel labelStructure = new RadLabel();

            labelStructure.AutoSize = true;

            labelStructure.Text = "RadLabel";

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(label, labelStructure.RootElement);

            designed.MainElementClassName = typeof(RadLabelElement).FullName;

            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(Control previewSurface)
        {
            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();
            //preview
            RadCalendar radCalendarPreview = new RadCalendar();

            radCalendarPreview.ShowColumnHeaders          = true;
            radCalendarPreview.ShowRowHeaders             = true;
            radCalendarPreview.ShowViewHeader             = true;
            radCalendarPreview.ShowViewSelector           = true;
            radCalendarPreview.ShowFooter                 = true;
            radCalendarPreview.Bounds                     = new Rectangle(0, 0, 250, 250);
            radCalendarPreview.AutoSize                   = true;
            radCalendarPreview.AllowSelect                = true;
            radCalendarPreview.AllowMultipleSelect        = true;
            radCalendarPreview.AllowViewSelector          = true;
            radCalendarPreview.AllowRowHeaderSelectors    = true;
            radCalendarPreview.AllowColumnHeaderSelectors = true;

            radCalendarPreview.SpecialDays.Add(new RadCalendarDay(DateTime.Now.Date.AddDays(3)));

            //structure menu

            RadCalendar radCalendarStructure = new RadCalendar();

            radCalendarStructure.ShowFooter        = true;
            radCalendarStructure.ShowColumnHeaders = true;
            radCalendarStructure.ShowRowHeaders    = true;
            radCalendarStructure.ShowViewHeader    = true;
            radCalendarStructure.ShowViewSelector  = true;

            radCalendarStructure.Bounds = new Rectangle(0, 0, 250, 250);

            //here we are trying to remove all children
            //to display only one cell in structure tree in VSB
            LightVisualElement firstDayName = null;
            LightVisualElement firstDay     = radCalendarStructure.CalendarElement.CalendarVisualElement.Children[0] as LightVisualElement;

            if (firstDay != null)
            {
                if (firstDay is CalendarHeaderCellElement)//found days headers cells (M,T,S,T,F,S,S)
                //first day should be with offset from 7 cells
                {
                    firstDayName = firstDay;
                    firstDay     = radCalendarStructure.CalendarElement.CalendarVisualElement.Children[7] as LightVisualElement;
                }

                radCalendarStructure.CalendarElement.CalendarVisualElement.Children.Clear();
                if (firstDayName != null)
                {
                    radCalendarStructure.CalendarElement.CalendarVisualElement.Children.Add(firstDayName);
                }
                radCalendarStructure.CalendarElement.CalendarVisualElement.Children.Add(firstDay);
            }


            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(radCalendarPreview, radCalendarStructure.RootElement);

            designed.Placemenet = PreviewControlPlacemenet.MiddleCenter;
            res.Add(designed);

            return(res);
        }
示例#23
0
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(Control previewSurface)
        {
            RadToolStripElement element = new RadToolStripElement();

            element.Size         = new Size(600, element.Size.Height);
            element.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
            RadToolStripItem item = new RadToolStripItem();

            item.Size         = new Size(600, item.Size.Height);
            item.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
            element.Items.Add(item);
            item.Items.Add(new RadButtonElement("one"));
            item.Items.Add(new RadDropDownButtonElement());
            item.Items.Add(new RadToolStripSeparatorItem());
            item.Items.Add(new RadToggleButtonElement());
            item.Items.Add(new RadRepeatButtonElement());
            item.Items.Add(new RadImageButtonElement());
            item.Items.Add(new RadRadioButtonElement());
            item.Items.Add(new RadCheckBoxElement());
            item.Items.Add(new RadTextBoxElement());
            item.Items.Add(new RadMaskedEditBoxElement());
            item.Items.Add(new RadSplitButtonElement());
            item.Items.Add(new RadApplicationMenuButtonElement());

            RadComboBoxElement combo = new RadComboBoxElement();

            combo.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
            item.Items.Add(combo);

            RadTextBoxElement textBoxElement = new RadTextBoxElement();

            textBoxElement.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
            item.Items.Add(textBoxElement);

            RadToolStrip toolStrip = new RadToolStrip();

            toolStrip.BeginInit();
            toolStrip.AutoSize = false;

            toolStrip.Bounds = new Rectangle(30, 30, 400, 50);
            toolStrip.Items.Add(element);
            toolStrip.AllowFloating = false;
            toolStrip.AllowDragging = false;
            toolStrip.EndInit();

            RadToolStrip toolStripStructure = new RadToolStrip();

            toolStripStructure.BeginInit();
            toolStripStructure.AllowDragging = false;
            toolStripStructure.AllowFloating = false;
            toolStripStructure.AutoSize      = false;

            RadToolStripElement structureElement = new RadToolStripElement();

            structureElement.Size         = new Size(600, structureElement.Size.Height);
            structureElement.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
            RadToolStripItem structureItem = new RadToolStripItem();

            structureItem.Size         = new Size(600, structureItem.Size.Height);
            structureItem.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;

            structureElement.Items.Add(structureItem);
            structureItem.Items.Add(new RadButtonElement("one"));
            structureItem.Items.Add(new RadDropDownButtonElement());
            structureItem.Items.Add(new RadToolStripSeparatorItem());
            structureItem.Items.Add(new RadToggleButtonElement());
            structureItem.Items.Add(new RadRepeatButtonElement());
            structureItem.Items.Add(new RadImageButtonElement());
            structureItem.Items.Add(new RadRadioButtonElement());
            structureItem.Items.Add(new RadCheckBoxElement());
            structureItem.Items.Add(new RadTextBoxElement());
            structureItem.Items.Add(new RadMaskedEditBoxElement());
            structureItem.Items.Add(new RadSplitButtonElement());
            structureItem.Items.Add(new RadApplicationMenuButtonElement());
            combo = new RadComboBoxElement();
            combo.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
            structureItem.Items.Add(combo);

            textBoxElement = new RadTextBoxElement();
            textBoxElement.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
            structureItem.Items.Add(textBoxElement);

            toolStripStructure.Bounds = new Rectangle(30, 30, 450, 50);

            toolStripStructure.Items.Add(structureElement);

            toolStripStructure.EndInit();

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(toolStrip, toolStripStructure.RootElement);

            designed.MainElementClassName = typeof(RadToolStripElement).FullName;
            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }