protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.topCommandsStackElement = this.CraeteTopCommandsStackElement();
     this.commandsStackViewport   = this.CreateCommandsStackViewport();
     this.scrollViewer            = this.CreateScrollViewer();
     this.commandsStackViewport.Children.Add((RadElement)this.topCommandsStackElement);
     this.scrollViewer.Viewport = (RadElement)this.commandsStackViewport;
     this.Children.Add((RadElement)this.scrollViewer);
     this.CreateTopCommands();
     this.CreateCommands();
 }
Beispiel #2
0
        protected override void CreateChildElements()
        {
            this.fill       = new FillPrimitive();
            this.fill.Class = "RadSubMenuPanelBackFillPrimitive";
            this.Children.Add(this.fill);

            this.border       = new BorderPrimitive();
            this.border.Class = "RadSubMenuPanelBorderPrimitive";
            this.Children.Add(this.border);

            leftColumnElement       = new RadElement();
            leftColumnElement.Class = "RadSubMenuPanelLeftElement";
            this.Children.Add(leftColumnElement);

            leftColumnFill       = new FillPrimitive();
            leftColumnFill.Class = "RadSubMenuPanelFillPrimitive";
            leftColumnElement.Children.Add(leftColumnFill);

            leftColumnBorder       = new BorderPrimitive();
            leftColumnBorder.Class = "RadSubMenuPanelLeftBorderPrimitive";
            leftColumnElement.Children.Add(leftColumnBorder);

            StackLayoutPanel panel = new StackLayoutPanel();

            panel.Orientation = Orientation.Horizontal;
            panel.ZIndex      = 1;
            this.Children.Add(panel);

            panel.Children.Add(CreateHeaderColumnElement());

            this.layoutPanel = CreateMenuLayout();

            if (GetBitState(UseScrollingStateKey))
            {
                this.scrollViewer = new RadScrollViewer();

                this.scrollViewer.ShowBorder = false;
                this.scrollViewer.ShowFill   = false;
                this.scrollViewer.Viewport   = this.layoutPanel;
                panel.Children.Add(this.scrollViewer);
            }
            else
            {
                panel.Children.Add(this.layoutPanel);
            }
        }
Beispiel #3
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            this.scrollViewer = new RadScrollViewer();
            this.scrollViewer.StretchHorizontally = true;
            this.scrollViewer.StretchVertically   = true;
            this.scrollViewer.ShowBorder          = false;
            this.scrollViewer.ShowFill            = false;
            this.Children.Add((RadElement)this.scrollViewer);
            this.panel                     = new StackLayoutElement();
            this.panel.Orientation         = Orientation.Vertical;
            this.panel.StretchHorizontally = true;
            this.panel.StretchVertically   = true;
            LightVisualElement lightVisualElement = new LightVisualElement();

            lightVisualElement.Children.Add((RadElement)this.panel);
            this.scrollViewer.Viewport = (RadElement)lightVisualElement;
            this.filterTextBox         = this.CreateFilterTextBox();
            this.Children.Add((RadElement)this.filterTextBox);
        }
        protected override void CreateChildItems(RadElement parent)
        {
            RadCanvasViewport viewport = new RadCanvasViewport();

            this.scrollView = new RadScrollViewer(viewport);
            this.scrollView.AutoSizeMode             = RadAutoSizeMode.FitToAvailableSize;
            this.scrollView.Scroll                  += delegate(object sender, ScrollPanelEventArgs args) { OnScroll(args); };
            this.scrollView.ScrollNeedsChanged      += delegate(object sender, ScrollNeedsEventArgs args) { OnScrollNeedsChanged(args); };
            this.scrollView.ScrollParametersChanged += delegate(object sender, RadPanelScrollParametersEventArgs args) { OnScrollParametersChanged(args); };

            this.rectangle          = new RectanglePrimitive();
            this.rectangle.AutoSize = false;
            this.rectangle.SetBounds(10, 10, 190, 190);
            this.rectangle.ForeColor = Color.Black;
            this.rectangle.BackColor = Color.Aqua;

            this.arrow          = new ArrowPrimitive();
            this.arrow.AutoSize = false;
            this.arrow.SetBounds(210, 210, 190, 190);
            this.arrow.ForeColor = Color.Black;
            this.arrow.BackColor = Color.Wheat;

            this.RootElement.Children.Add(this.scrollView);
            foreach (RadElement child in this.scrollView.Children)
            {
                if (child.Class == "RadScrollViewFill" && child is FillPrimitive)
                {
                    background = (FillPrimitive)child;
                    break;
                }
            }

            this.backgroundAdded = true;
            this.scrollView.Viewport.Children.Add(rectangle);
            this.squareAdded = true;
            this.scrollView.Viewport.Children.Add(arrow);
            this.arrowAdded = true;


            this.ThemeName = "";
        }
Beispiel #5
0
        protected override void CreateChildElements()
        {
            this.filterDropDown                                      = new RadDropDownButtonElement();
            this.filterDropDown.Alignment                            = ContentAlignment.TopLeft;
            this.filterDropDown.ExpandArrowButton                    = true;
            this.filterDropDown.ArrowButton.Arrow.Alignment          = ContentAlignment.MiddleLeft;
            this.filterDropDown.Class                                = "RadGalleryPopupFilterDropDownButton";
            this.filterDropDown.ActionButton.ButtonFillElement.Class = "RadGalleryPopupFilterActionButtonFill";
            this.filterDropDown.ActionButton.BorderElement.Class     = "RadGalleryPopupFilterActionButtonBorder";
            this.filterDropDown.ActionButton.Class                   = "RadGalleryPopupFilterActionButton";
            this.filterDropDown.ArrowButton.Fill.Class               = "RadGalleryPopupFilterArrowButtonFill";
            this.filterDropDown.ArrowButton.Border.Class             = "RadGalleryPopupFilterArrowButtonBorder";
            this.filterDropDown.ArrowButton.Arrow.Class              = "RadGalleryPopupFilterArrowButtonArrow";
            this.filterDropDown.BorderElement.Class                  = "RadGalleryPopupFilterDropDownButtonBorder";

            this.popupGroupsViewport = new RadCanvasViewport();

            this.popupScrollViewer = new RadScrollViewer(this.popupGroupsViewport);
            this.popupScrollViewer.AutoSizeMode          = RadAutoSizeMode.FitToAvailableSize;
            this.popupScrollViewer.HorizontalScrollState = ScrollState.AlwaysHide;
            this.popupScrollViewer.UsePhysicalScrolling  = true;
            this.popupScrollViewer.Class             = "RadGalleryPopupScrollViewer";
            this.popupScrollViewer.FillElement.Class = "RadGalleryPopupScrollViewerFill";

            this.subMenuLayoutPanel           = new RadGalleryMenuLayoutPanel();
            this.subMenuLayoutPanel.Alignment = ContentAlignment.BottomLeft;
            this.subMenuLayoutPanel.Class     = "RadGalleryPoupMenuPanel";

            this.dropDownPanel = new StackLayoutPanel();
            this.dropDownPanel.AutoSizeMode       = RadAutoSizeMode.FitToAvailableSize;
            this.dropDownPanel.Orientation        = System.Windows.Forms.Orientation.Vertical;
            this.dropDownPanel.EqualChildrenWidth = true;

            this.downMenu = new RadGalleryDropDown(this);
            this.WireMenuDropDownEvents();
            this.downMenu.VerticalPopupAlignment   = VerticalPopupAlignment.TopToTop;
            this.downMenu.HorizontalPopupAlignment = HorizontalPopupAlignment.LeftToLeft;
            this.downMenu.AnimationEnabled         = false;

            this.galleryPopupElement = new RadGalleryPopupElement(
                this.Items,
                this.Groups,
                this.Filters,
                this.Tools);
            this.downMenu.PopupElement = this.galleryPopupElement;
            this.downMenu.LoadElementTree();
            this.dropDownPanel.Children.Add(this.filterDropDown);
            this.dropDownPanel.Children.Add(this.popupScrollViewer);
            this.dropDownPanel.Children.Add(this.subMenuLayoutPanel);

            //TODO: perhaps we should implement RadStackViewport to support integral scrolling
            this.inribbonItemsLayoutPanel            = new IntegralScrollWrapPanel();
            this.inribbonItemsLayoutPanel.MaxColumns = this.MaxColumns;
            this.inribbonItemsLayoutPanel.MaxRows    = this.MaxRows;
            this.Items.Owner = this.inribbonItemsLayoutPanel;

            this.upButton                         = new RadImageButtonElement();
            this.upButton.Class                   = "GalleryUpButton";
            this.upButton.Enabled                 = false;
            this.upButton.MinSize                 = arrowButtonsMinSize;
            this.upButton.Click                  += new EventHandler(upButton_Click);
            this.upButton.BorderElement.Class     = "GalleryUpButtonBorder";
            this.upButton.ButtonFillElement.Class = "GalleryArrowButtonFill";

            this.downButton                         = new RadImageButtonElement();
            this.downButton.Class                   = "GalleryDownButton";
            this.downButton.MinSize                 = arrowButtonsMinSize;
            this.downButton.Click                  += new EventHandler(downButton_Click);
            this.downButton.BorderElement.Class     = "GalleryDownButtonBorder";
            this.downButton.ButtonFillElement.Class = "GalleryArrowButtonFill";

            this.popupButton         = new RadImageButtonElement();
            this.popupButton.Class   = "GalleryPopupButtonButton";
            this.popupButton.MinSize = arrowButtonsMinSize;

            this.popupButton.MouseDown              += new System.Windows.Forms.MouseEventHandler(popupButton_MouseDown);
            this.popupButton.BorderElement.Class     = "GalleryPopupButtonButtonBorder";
            this.popupButton.ButtonFillElement.Class = "GalleryArrowButtonFill";

            this.buttonsPanel         = new RadGalleryButtonsLayoutPanel();
            this.buttonsPanel.MaxSize = buttonsPanelMaxSize;
            this.buttonsPanel.SetValue(DropDownEditorLayoutPanel.IsArrowButtonProperty, true);
            this.buttonsPanel.Children.Add(upButton);
            this.buttonsPanel.Children.Add(downButton);
            this.buttonsPanel.Children.Add(popupButton);

            this.inribbonPanel = new DropDownEditorLayoutPanel();
            this.inribbonPanel.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;

            this.inribbonFillPrimitive       = new FillPrimitive();
            this.inribbonFillPrimitive.Class = "InribbonGalleryFill";

            this.inribbonPanel.Children.Add(this.inribbonItemsLayoutPanel);
            this.inribbonPanel.Children.Add(this.buttonsPanel);

            this.inribbonPanelBorder            = new BorderPrimitive();
            this.inribbonPanelBorder.Visibility = ElementVisibility.Collapsed;
            this.inribbonPanelBorder.Class      = "InribbonGalleryBorder";
            this.Children.Add(this.inribbonPanelBorder);
            this.Children.Add(this.inribbonFillPrimitive);
            this.Children.Add(this.inribbonPanel);
        }