Beispiel #1
0
        protected override void CreateChildElements()
        {
            this.quickAccessItemsPanel = new InnerItem();
            if (!this.DesignMode)
            {
                this.quickAccessItemsPanel.Visibility = ElementVisibility.Collapsed;
            }
            this.Children.Add((RadElement)this.quickAccessItemsPanel);
            this.overFlowButton            = new RadQuickAccessOverflowButton();
            this.overFlowButton.Class      = "QuickAccessToolBarOverFlow";
            this.overFlowButton.Click     += new EventHandler(this.overFlowButton_Click);
            this.overFlowButton.Visibility = ElementVisibility.Collapsed;
            int num = (int)this.overFlowButton.OverFlowPrimitive.SetDefaultValueOverride(RadElement.AlignmentProperty, (object)ContentAlignment.MiddleCenter);

            this.overFlowButton.ThemeRole           = "QuickAccessOverflowButton";
            this.overFlowButton.StretchHorizontally = false;
            this.Children.Add((RadElement)this.overFlowButton);
            this.items.Owner = (RadElement)this.quickAccessItemsPanel.ContentLayout;
        }
        protected override void CreateChildElements()
        {
            this.quickAccessItemsPanel = new InnerItem();
            this.quickAccessItemsPanel.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;

            this.baseLayout                     = new StackLayoutPanel();
            this.baseLayout.Orientation         = Orientation.Horizontal;
            this.baseLayout.EqualChildrenHeight = true;
            this.baseLayout.AutoSizeMode        = RadAutoSizeMode.WrapAroundChildren;
            this.baseLayout.Class               = "QuickAccessToolBarBaseStripLayout";

            this.overFlowButton            = new RadToolStripOverFlowButtonElement();
            this.overFlowButton.Class      = "QuickAccessToolBarOverFlow";
            this.overFlowButton.Click     += new EventHandler(overFlowButton_Click);
            this.overFlowButton.Margin     = new Padding(3, 0, 0, 0);
            this.overFlowButton.Visibility = ElementVisibility.Collapsed;
            this.overFlowButton.MaxSize    = new Size(0, 16);
            this.overFlowButton.OverFlowPrimitive.Alignment = ContentAlignment.MiddleCenter;
            this.overFlowButton.Alignment = ContentAlignment.MiddleLeft;
            this.overFlowButton.ThemeRole = "QuickAccessOverflowButton";

            this.stripFill = new FillPrimitive();
            this.stripFill.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
            this.stripFill.Class        = "QuickAccessToolBarFill";

            this.border              = new BorderPrimitive();
            this.border.Class        = "QuickAccesstBorder";
            this.border.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;

            this.baseLayout.Children.Add(this.quickAccessItemsPanel);
            this.baseLayout.Children.Add(this.overFlowButton);

            this.Children.Add(this.stripFill);
            this.Children.Add(this.baseLayout);
            this.Children.Add(this.border);

            this.items.Owner = quickAccessItemsPanel.StripLayout;
            this.RefreshItems();
        }