コード例 #1
0
        private AccessibleObject GetQuickAccessBarAccesibleObject(int index)
        {
            if (index < this.ribbonBar.QuickAccessToolBarItems.Count)
            {
                RadItem accessToolBarItem = this.ribbonBar.QuickAccessToolBarItems[index];
                string  name = accessToolBarItem.Name;
                if (string.IsNullOrEmpty(name))
                {
                    name = "QuickAccessToolBarItems" + (object)index;
                }
                if (accessToolBarItem is RadDropDownButtonElement)
                {
                    return((AccessibleObject) new RadDropDownButtonElementAccessibleObject(accessToolBarItem as RadDropDownButtonElement, name));
                }
                if (accessToolBarItem is RadButtonElement)
                {
                    return((AccessibleObject) new RadRibbonBarItemAccessibleObject(accessToolBarItem, this, accessToolBarItem.Name));
                }
                return(new AccessibleObject());
            }
            if (index != this.ribbonBar.QuickAccessToolBarItems.Count)
            {
                return((AccessibleObject)null);
            }
            RadQuickAccessOverflowButton overflowButtonElement = this.ribbonBar.RibbonBarElement.QuickAccessToolBar.OverflowButtonElement;
            string name1 = overflowButtonElement.Name;

            if (string.IsNullOrEmpty(name1))
            {
                name1 = "overFlowButton" + (object)index;
            }
            return((AccessibleObject) new RadDropDownButtonElementAccessibleObject((RadDropDownButtonElement)overflowButtonElement, name1));
        }
コード例 #2
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;
        }