private void ResetQuickAccessItemVisibility(RadMenuAssociatedItem item, bool visible) { if (item.AssociatedItem == null) { return; } item.IsChecked = visible; this.SetItemVisibility(item.AssociatedItem, visible); }
private void PrepareDropDownItems() { this.UnwireEvents(); foreach (RadItem item in this.Items) { if (item is RadToolStripSeparatorItem) { continue; } RadMenuAssociatedItem menuItem = new RadMenuAssociatedItem(item); menuItem.Text = item.Text; if (!(bool)item.GetValue(IsCollapsedByUserProperty)) { menuItem.IsChecked = true; } else { menuItem.IsChecked = false; } menuItem.Click += OnMenuItemShowHideItem_Click; this.overFlowButton.MinSize = new Size(this.overFlowButton.MinSize.Width, Math.Max(this.overFlowButton.MinSize.Height, item.Size.Height)); this.overFlowButton.Items.Add(menuItem); } this.overFlowButton.Items.Add(new RadMenuSeparatorItem()); this.toolbarPositionMenuItem.Text = this.ribbonBarElement.QuickAccessToolbarBelowRibbon ? this.ribbonBarElement.LocalizationSettings.ShowQuickAccessMenuAboveItemText : this.ribbonBarElement.LocalizationSettings.ShowQuickAccessMenuBelowItemText; this.overFlowButton.Items.Add(this.toolbarPositionMenuItem); this.overFlowButton.Items.Add(this.minimizeRibonMenuItem); RadRibbonBar ribbon = this.ParentRibbonBar.ElementTree.Control as RadRibbonBar; if (ribbon != null) { if (ribbon.Expanded) { this.minimizeRibonMenuItem.Text = this.ribbonBarElement.LocalizationSettings.MinimizeRibbonItemText; } else { this.minimizeRibonMenuItem.Text = this.ribbonBarElement.LocalizationSettings.MaximizeRibbonItemText; } } this.toolbarPositionMenuItem.Click += new EventHandler(OnMenuItemQuickAccessPosition_Click); this.minimizeRibonMenuItem.Click += new EventHandler(OnMinimizeItem_Click); }
private void PrepareDropDownItems() { this.UnwireEvents(); foreach (RadItem associatedItem in (RadItemCollection)this.Items) { if (!(associatedItem is CommandBarSeparator)) { RadMenuAssociatedItem menuAssociatedItem = new RadMenuAssociatedItem(associatedItem); menuAssociatedItem.Text = associatedItem.Text; if (!(bool)associatedItem.GetValue(RadQuickAccessToolBar.IsCollapsedByUserProperty)) { menuAssociatedItem.IsChecked = true; } else { menuAssociatedItem.IsChecked = false; } menuAssociatedItem.Click += new EventHandler(this.OnMenuItemShowHideItem_Click); this.overFlowButton.Items.Add((RadItem)menuAssociatedItem); } } this.overFlowButton.Items.Add((RadItem) new RadMenuSeparatorItem()); this.toolbarPositionMenuItem.Text = this.ParentRibbonBar.QuickAccessToolbarBelowRibbon ? this.ParentRibbonBar.LocalizationSettings.ShowQuickAccessMenuAboveItemText : this.ParentRibbonBar.LocalizationSettings.ShowQuickAccessMenuBelowItemText; this.overFlowButton.Items.Add((RadItem)this.toolbarPositionMenuItem); this.overFlowButton.Items.Add((RadItem)this.minimizeRibonMenuItem); RadRibbonBar control = this.ParentRibbonBar.ElementTree.Control as RadRibbonBar; if (control != null) { if (control.Expanded) { this.minimizeRibonMenuItem.Text = this.ParentRibbonBar.LocalizationSettings.MinimizeRibbonItemText; } else { this.minimizeRibonMenuItem.Text = this.ParentRibbonBar.LocalizationSettings.MaximizeRibbonItemText; } } this.toolbarPositionMenuItem.Click += new EventHandler(this.OnMenuItemQuickAccessPosition_Click); this.minimizeRibonMenuItem.Click += new EventHandler(this.OnMinimizeItem_Click); }