protected override void InitializeFields() { base.InitializeFields(); this.text = new TextPrimitive(); this.text.Class = "AlertWindowTextCaptionText"; this.closeButton = new RadButtonElement(); this.closeButton.SetDefaultValueOverride(RadButtonItem.DisplayStyleProperty, DisplayStyle.Image); this.closeButton.ThemeRole = "AlertCloseButton"; this.pinButton = new RadToggleButtonElement(); this.pinButton.SetDefaultValueOverride(RadButtonItem.DisplayStyleProperty, DisplayStyle.Image); this.pinButton.ThemeRole = "AlertWindowPinButton"; this.optionsButton = new RadDropDownButtonElement(); this.optionsButton.ArrowButton.SetDefaultValueOverride(RadElement.VisibilityProperty, ElementVisibility.Collapsed); this.optionsButton.ThemeRole = "AlertWindowOptionsButton"; this.buttonsLayoutPanel = new StackLayoutPanel(); this.buttonsLayoutPanel.Class = "AlertWindowButtonsLayoutPanel"; this.mainLayoutPanel = new DockLayoutPanel(); this.mainLayoutPanel.Class = "AlertWindowMainLayoutPanel"; this.mainLayoutPanel.LastChildFill = true; this.MinSize = new System.Drawing.Size(0, 15); }
protected override void CreateChildElements() { base.CreateChildElements(); this.searchTextBox = this.CreateSearchTextBox(); this.Children.Add((RadElement)this.searchTextBox); this.waitingBar = this.CreateWaitingBarElement(); this.Children.Add((RadElement)this.waitingBar); this.findPreviousButton = this.CreateFindPreviousButton(); this.Children.Add((RadElement)this.findPreviousButton); this.findNextButton = this.CreateFindNextButton(); this.Children.Add((RadElement)this.findNextButton); this.matchCaseButton = this.CreateMatchCaseButton(); this.chooseColumnsMenuItem = this.CreateChooseColumnsMenuItem(); this.matchCaseMenuItem = this.CreateMatchCaseMenuItem(); this.searchFromCurrentPositionMenuItem = this.CreateSearchFromCurrentPositionMenuItem(); this.optionsButton = this.CreateOptionsButton(); this.Children.Add((RadElement)this.optionsButton); this.buttonsStack = new StackLayoutPanel(); this.buttonsStack.Margin = new Padding(0, 1, 0, 2); this.Children.Add((RadElement)this.buttonsStack); this.closeButton = this.CreateCloseButton(); this.closeButton.Class = "SearchRowCloseButton"; this.closeButton.Click += new EventHandler(this.CloseButton_Click); this.buttonsStack.Children.Add((RadElement)this.closeButton); }
protected virtual RadDropDownButtonElement CreateDropDownButton() { RadDropDownButtonElement downButtonElement = new RadDropDownButtonElement(); downButtonElement.StretchHorizontally = false; downButtonElement.StretchVertically = false; downButtonElement.MinSize = new Size(54, 0); return(downButtonElement); }
public RadDropDownButtonElementAccessibleObject( RadDropDownButtonElement buttonElement, string name) : base(buttonElement.ElementTree.Control, name) { this.buttonElement = buttonElement; this.buttonElement.DropDownOpened += new EventHandler(this.buttonElement_DropDownOpened); this.buttonElement.DropDownClosed += new EventHandler(this.buttonElement_DropDownClosed); this.buttonElement.DropDownMenu.ItemSelected += new ItemSelectedEventHandler(this.DropDownMenu_ItemSelected); }
protected override void CreateChildItems(RadElement parent) { base.CreateChildItems(parent); this.dropDownButtonElement = this.CreateButtonElement(); this.dropDownButtonElement.DropDownOpening += new CancelEventHandler(this.dropDownButtonElement_DropDownOpening); this.dropDownButtonElement.DropDownOpened += new EventHandler(this.dropDownButtonElement_DropDownOpened); this.dropDownButtonElement.DropDownClosed += new EventHandler(this.dropDownButtonElement_DropDownClosed); this.RootElement.Children.Add((RadElement)this.dropDownButtonElement); this.dropDownButtonElement.ArrowButton.Arrow.AutoSize = true; }
protected virtual RadDropDownButtonElement CreateOptionsButton() { RadDropDownButtonElement downButtonElement = new RadDropDownButtonElement(); downButtonElement.DisplayStyle = DisplayStyle.Image; downButtonElement.ImageAlignment = ContentAlignment.MiddleCenter; downButtonElement.Margin = new Padding(8, 1, 8, 2); downButtonElement.ActionButton.Padding = new Padding(2, 0, 2, 0); downButtonElement.Items.AddRange((RadItem)this.chooseColumnsMenuItem, (RadItem) new RadMenuSeparatorItem(), (RadItem)this.matchCaseMenuItem, (RadItem)this.searchFromCurrentPositionMenuItem); return(downButtonElement); }
static RadDropDownButtonElement() { ItemStateManagerFactoryRegistry.AddStateManagerFactory((ItemStateManagerFactoryBase) new DropDownButtonStateManagerFatory(), typeof(RadDropDownButtonElement)); RadDropDownButtonElement.mappedStyleProperties = new Dictionary <RadProperty, RadProperty>(); RadDropDownButtonElement.DropDownOpeningEventKey = new object(); RadDropDownButtonElement.DropDownOpenedEventKey = new object(); RadDropDownButtonElement.DropDownClosedEventKey = new object(); RadDropDownButtonElement.DropDownClosingEventKey = new object(); RadDropDownButtonElement.DropDownItemClickedEventKey = new object(); RadDropDownButtonElement.AddMappedPropertyMappings(); RadElement.CanFocusProperty.OverrideMetadata(typeof(RadDropDownButtonElement), (RadPropertyMetadata) new RadElementPropertyMetadata((object)true, ElementPropertyOptions.AffectsDisplay)); }
private RadItem CloneItem(RadItem item) { RadItem itemToReturn = null; if (item is RadButtonElement) { itemToReturn = new RadButtonElement(); itemToReturn.Text = item.Text; if (this.imageList != null) { int index = (item as RadButtonElement).ImageIndex; if (index >= 0) { (itemToReturn as RadButtonElement).Image = imageList.Images[index]; } } else { (itemToReturn as RadButtonElement).Image = (item as RadButtonElement).Image; } } if (item is RadDropDownButtonElement) { itemToReturn = new RadDropDownButtonElement(); itemToReturn.Text = item.Text; if (this.imageList != null) { int index = (item as RadDropDownButtonElement).ImageIndex; if (index >= 0) { (itemToReturn as RadDropDownButtonElement).Image = imageList.Images[index]; } } else { (itemToReturn as RadDropDownButtonElement).Image = (item as RadDropDownButtonElement).Image; } } return(itemToReturn); }
private RadItem CreateFakeItem(RadItem item) { if (item as RadButtonElement != null) { RadButtonElement element = new RadButtonElement(); element.Text = item.Text; element.Font = item.Font; element.Image = (item as RadButtonElement).Image; element.ImageIndex = (item as RadButtonElement).ImageIndex; element.ImageKey = (item as RadButtonElement).ImageKey; return(element); } if (item as RadComboBoxElement != null) { RadComboBoxElement element = new RadComboBoxElement(); element.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren; element.Text = item.Text; element.Font = item.Font; return(element); } if (item as RadTextBoxElement != null) { RadTextBoxElement element = new RadTextBoxElement(); element.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren; element.Text = item.Text; element.Font = item.Font; return(element); } if (item as RadDropDownButtonElement != null) { RadDropDownButtonElement element = new RadDropDownButtonElement(); element.Text = item.Text; element.Image = (item as RadDropDownButtonElement).Image; element.ImageIndex = (item as RadDropDownButtonElement).ImageIndex; element.ImageKey = (item as RadDropDownButtonElement).ImageKey; return(element); } return(null); }
protected override void CreateChildElements() { base.CreateChildElements(); this.Children.Remove((RadElement)this.ContentElement); this.dropDownButton = this.CreateDropDownButton(); this.dropDownButton.Text = LocalizationProvider <DataFilterLocalizationProvider> .CurrentProvider.GetLocalizedString("AddNewButtonText"); this.Children.Add((RadElement)this.dropDownButton); this.addGroupItem = this.CreateMenuItem(); this.addGroupItem.Text = LocalizationProvider <DataFilterLocalizationProvider> .CurrentProvider.GetLocalizedString("AddNewButtonGroup"); this.addGroupItem.Click += new EventHandler(this.AddGroupItem_Click); this.dropDownButton.Items.Add((RadItem)this.addGroupItem); this.addCriteriaItem = this.CreateMenuItem(); this.addCriteriaItem.Text = LocalizationProvider <DataFilterLocalizationProvider> .CurrentProvider.GetLocalizedString("AddNewButtonExpression"); this.addCriteriaItem.Click += new EventHandler(this.AddCriteriaItem_Click); this.dropDownButton.Items.Add((RadItem)this.addCriteriaItem); }
protected override void CreateChildItems(RadElement parent) { if (this.dropDownButtonElement == null) { this.dropDownButtonElement = this.CreateButtonElement(); } this.dropDownButtonElement.Owner = this; this.dropDownButtonElement.DropDownOpening += new CancelEventHandler(this.dropDownButtonElement_DropDownOpening); this.dropDownButtonElement.DropDownOpened += new EventHandler(this.dropDownButtonElement_DropDownOpened); this.dropDownButtonElement.DropDownClosed += new EventHandler(this.dropDownButtonElement_DropDownClosed); this.RootElement.Children.Add(this.dropDownButtonElement); this.dropDownButtonElement.BindProperty(RadDropDownButtonElement.AutoSizeModeProperty, this.RootElement, RootRadElement.AutoSizeModeProperty, PropertyBindingOptions.OneWay); RadArrowButtonElement arrowButton = this.dropDownButtonElement.ArrowButton; arrowButton.Arrow.AutoSize = true; base.CreateChildItems(parent); }
protected override void CreateChildElements() { DockLayoutPanel parentStripLayout = new DockLayoutPanel(); this.stripLayout = new BoxLayout(); this.stripLayout.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren; this.stripLayout.Orientation = System.Windows.Forms.Orientation.Horizontal; this.stripLayout.Class = "overFlowLayout"; this.overFlowBorder = new BorderPrimitive(); this.overFlowBorder.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.overFlowBorder.Class = "overFlowBorder"; this.overFlowFill = new FillPrimitive(); this.overFlowFill.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.overFlowFill.Class = "overFlowFill"; this.overFlowFill.MinSize = new System.Drawing.Size(20, 20); this.dropDownButton = new RadDropDownButtonElement(); this.Children.Add(this.overFlowFill); this.Children.Add(this.overFlowBorder); this.Children.Add(parentStripLayout); this.dropDownButton.ArrowButton.Arrow.AutoSize = true; this.stripLayout.RightToLeft = true; this.dropDownButton.StretchHorizontally = false; this.dropDownButton.StretchVertically = false; this.dropDownButton.Alignment = ContentAlignment.MiddleRight; this.dropDownButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.dropDownButton.MinSize = new Size(16, 16); this.dropDownButton.ArrowButton.MinSize = new Size(16, 16); this.dropDownButton.SetValue(DockLayoutPanel.DockProperty, Dock.Right); parentStripLayout.Children.Add(this.dropDownButton); parentStripLayout.Children.Add(this.stripLayout); this.items.Owner = this.stripLayout; }
public RadDropDownButtonElementAccessibleObject(RadDropDownButtonElement buttonElement) { this.buttonElement = buttonElement; this.buttonElement.DropDownOpened += new EventHandler(buttonElement_DropDownOpened); this.buttonElement.DropDownClosed += new EventHandler(buttonElement_DropDownClosed); }
/// <summary> /// Override this method to create custom main element. By default the main element is an instance of /// RadDropDownButtonElement. /// </summary> /// <returns>Instance of the one-and-only child of the root element of RadDropDownButton.</returns> protected virtual RadDropDownButtonElement CreateButtonElement() { RadDropDownButtonElement res = new RadDropDownButtonElement(); return(res); }
protected override void CreateChildElements() { this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "RibbonBarChunkBorder"; this.borderPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.groupFill = new FillPrimitive(); this.groupFill.Class = "RibbonBarGroupMainFill"; this.groupFill.ZIndex = -1; this.groupFill.SetDefaultValueOverride(FillPrimitive.BackColorProperty, Color.Transparent); this.groupFill.SetDefaultValueOverride(FillPrimitive.GradientStyleProperty, GradientStyles.Solid); this.textPrimitive = new TextPrimitive(); this.textPrimitive.RadPropertyChanged += new RadPropertyChangedEventHandler(this.textPrimitive_RadPropertyChanged); this.textPrimitive.BindProperty(TextPrimitive.TextProperty, this, RadRibbonBarGroup.TextProperty, PropertyBindingOptions.TwoWay); this.textPrimitive.Class = "RibbonBarChunkCaption"; this.textPrimitive.Alignment = ContentAlignment.MiddleCenter; this.textPrimitive.Padding = new Padding(0); this.elementWithCaptionLayoutPanel = new ElementWithCaptionLayoutPanel(); DockLayoutPanel dockLayout = new DockLayoutPanel(); this.captionElementFill = new FillPrimitive(); this.captionElementFill.AutoSizeMode = RadAutoSizeMode.Auto; this.captionElementFill.SetValue(ElementWithCaptionLayoutPanel.CaptionElementProperty, true); this.captionElementFill.Class = "ChunkCaptionFill"; this.captionElementFill.Children.Add(dockLayout); //add DialogButton //PP 14/09/2007 this.dialogButton = new RadButtonElement(); this.dialogButton.Padding = new Padding(0, 3, 0, 0); this.dialogButton.SetDefaultValueOverride(RadButtonItem.ImageProperty, ResourceHelper.ImageFromResource(typeof(RadRibbonBarGroup), "Telerik.WinControls.UI.Resources.RibbonDialogButton.png")); this.dialogButton.Alignment = ContentAlignment.BottomRight; this.dialogButton.Visibility = ElementVisibility.Collapsed; this.dialogButton.Class = "DialogButtonClass"; this.dialogButton.SetValue(DockLayoutPanel.DockProperty, Dock.Right); dockLayout.Children.Add(this.dialogButton); //end add dockLayout.Children.Add(this.textPrimitive); dockLayout.LastChildFill = true; elementWithCaptionLayoutPanel.Children.Add(this.captionElementFill); FillPrimitive bodyElementFill = new FillPrimitive(); bodyElementFill.AutoSizeMode = RadAutoSizeMode.Auto; bodyElementFill.Class = "ChunkBodyFill"; bodyElementFill.Padding = new Padding(2, 2, 2, 0); BorderPrimitive bodyBorder = new BorderPrimitive(); bodyBorder.Class = "BodyBorder"; bodyBorder.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; bodyBorder.GradientStyle = GradientStyles.Linear; bodyBorder.ForeColor = Color.Transparent; bodyBorder.ForeColor2 = Color.White; bodyBorder.ForeColor3 = Color.White; bodyBorder.ForeColor4 = Color.White; bodyElementFill.Children.Add(bodyBorder); this.stackLayoutPanel = new StackLayoutPanel(); this.stackLayoutPanel.Class = "Test";//remove this - only for tests this.elementWithCaptionLayoutPanel.Children.Add(bodyElementFill); bodyElementFill.Children.Add(this.stackLayoutPanel); this.dropDownElement = new RadRibbonBarGroupDropDownButtonElement(); this.dropDownElement.DropDownInheritsThemeClassName = true; this.dropDownElement.Visibility = ElementVisibility.Collapsed; this.dropDownElement.ActionButton.Shape = new RoundRectShape(4); //this.dropDownElement.DropDownMenu.RootElement.ApplyShapeToControl = true; //this.dropDownElement.DropDownMenu.RootElement.Shape = new RoundRectShape(4); this.dropDownElement.BorderElement.Class = "GroupDropDownButtonBorder"; this.dropDownElement.BorderElement.Visibility = ElementVisibility.Collapsed; //As of Q1 2010, theme support for the group's popup border and fill RadDropDownMenuElement element = this.dropDownElement.DropDownMenu.PopupElement as RadDropDownMenuElement; element.Fill.Class = "RibbonBarGroupDropDownFill"; element.Border.Class = "RibbonBarGroupDropDownBorder"; element.Class = "RibbonBarGroupDropDownElement"; this.dropDownElement.DropDownMenu.RootElement.Class = "RibbonBarGroupDropDownRoot"; // FillPrimitive dropDownFill = new FillPrimitive(); dropDownFill.Visibility = ElementVisibility.Collapsed; dropDownFill.Class = "ChunkBodyFill"; dropDownElement.DropDownMenu.RootElement.Children.Add(dropDownFill); this.dropDownElement.Image = ResourceHelper.ImageFromResource(typeof(RadRibbonBarGroup), "Telerik.WinControls.UI.Resources.dropDown.png"); this.dropDownElement.DisplayStyle = DisplayStyle.ImageAndText; this.dropDownElement.TextImageRelation = TextImageRelation.ImageAboveText; this.dropDownElement.ShowArrow = false; this.dropDownElement.Margin = new Padding(4, 4, 4, 4); this.dropDownElement.ActionButton.BorderElement.Visibility = ElementVisibility.Hidden; this.dropDownElement.ActionButton.BorderElement.Class = "GroupDropDownButtonInnerBorder"; this.dropDownElement.ActionButton.Padding = new Padding(4, 10, 4, 28); this.dropDownElement.BindProperty(RadDropDownButtonElement.TextProperty, this, RadRibbonBarGroup.TextProperty, PropertyBindingOptions.OneWay); this.Children.Add(this.dropDownElement); this.dropDownElement.ImageAlignment = ContentAlignment.MiddleCenter; this.dropDownElement.ThemeRole = "RibbonGroupDropDownButton"; this.Children.Add(this.elementWithCaptionLayoutPanel); this.Children.Add(this.borderPrimitive); this.Children.Add(this.groupFill); this.items.Owner = this.stackLayoutPanel; this.items.ItemsChanged += this.ItemChanged; }
protected override void CreateChildElements() { this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "RibbonBarChunkBorder"; this.borderPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.groupFill = new FillPrimitive(); this.groupFill.Class = "RibbonBarGroupMainFill"; this.groupFill.ZIndex = -1; int num1 = (int)this.groupFill.SetDefaultValueOverride(VisualElement.BackColorProperty, (object)Color.Transparent); int num2 = (int)this.groupFill.SetDefaultValueOverride(FillPrimitive.GradientStyleProperty, (object)GradientStyles.Solid); this.textPrimitive = new TextPrimitive(); this.textPrimitive.RadPropertyChanged += new RadPropertyChangedEventHandler(this.textPrimitive_RadPropertyChanged); int num3 = (int)this.textPrimitive.BindProperty(TextPrimitive.TextProperty, (RadObject)this, RadItem.TextProperty, PropertyBindingOptions.TwoWay); this.textPrimitive.Class = "RibbonBarChunkCaption"; this.textPrimitive.Alignment = ContentAlignment.MiddleCenter; this.textPrimitive.Padding = new Padding(0); this.elementWithCaptionLayoutPanel = new ElementWithCaptionLayoutPanel(); DockLayoutPanel dockLayoutPanel = new DockLayoutPanel(); this.captionElementFill = new FillPrimitive(); this.captionElementFill.AutoSizeMode = RadAutoSizeMode.Auto; int num4 = (int)this.captionElementFill.SetValue(ElementWithCaptionLayoutPanel.CaptionElementProperty, (object)true); this.captionElementFill.Class = "ChunkCaptionFill"; this.captionElementFill.Children.Add((RadElement)dockLayoutPanel); this.dialogButton = new RadButtonElement(); this.dialogButton.Padding = new Padding(0, 3, 0, 0); int num5 = (int)this.dialogButton.SetDefaultValueOverride(RadButtonItem.ImageProperty, (object)Telerik.WinControls.ResourceHelper.ImageFromResource(typeof(RadRibbonBarGroup), "Telerik.WinControls.UI.Resources.RibbonDialogButton.png")); this.dialogButton.Alignment = ContentAlignment.BottomRight; this.dialogButton.Visibility = ElementVisibility.Collapsed; this.dialogButton.Class = "DialogButtonClass"; int num6 = (int)this.dialogButton.SetValue(DockLayoutPanel.DockProperty, (object)Dock.Right); dockLayoutPanel.Children.Add((RadElement)this.dialogButton); dockLayoutPanel.Children.Add((RadElement)this.textPrimitive); dockLayoutPanel.LastChildFill = true; this.elementWithCaptionLayoutPanel.Children.Add((RadElement)this.captionElementFill); this.bodyElementFill = new FillPrimitive(); this.bodyElementFill.AutoSizeMode = RadAutoSizeMode.Auto; this.bodyElementFill.Class = "ChunkBodyFill"; this.bodyElementFill.Padding = new Padding(2, 2, 2, 0); BorderPrimitive borderPrimitive = new BorderPrimitive(); borderPrimitive.Class = "BodyBorder"; borderPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; borderPrimitive.GradientStyle = GradientStyles.Linear; borderPrimitive.ForeColor = Color.Transparent; borderPrimitive.ForeColor2 = Color.White; borderPrimitive.ForeColor3 = Color.White; borderPrimitive.ForeColor4 = Color.White; this.bodyElementFill.Children.Add((RadElement)borderPrimitive); this.stackLayoutPanel = new StackLayoutPanel(); this.elementWithCaptionLayoutPanel.Children.Add((RadElement)this.bodyElementFill); this.bodyElementFill.Children.Add((RadElement)this.stackLayoutPanel); this.dropDownElement = (RadDropDownButtonElement) new RadRibbonBarGroupDropDownButtonElement(); this.dropDownElement.DropDownInheritsThemeClassName = true; this.dropDownElement.Visibility = ElementVisibility.Collapsed; this.dropDownElement.ActionButton.Shape = (ElementShape) new RoundRectShape(4); this.dropDownElement.BorderElement.Class = "GroupDropDownButtonBorder"; this.dropDownElement.BorderElement.Visibility = ElementVisibility.Collapsed; RadDropDownMenuElement popupElement = this.dropDownElement.DropDownMenu.PopupElement as RadDropDownMenuElement; popupElement.Fill.Class = "RibbonBarGroupDropDownFill"; popupElement.Border.Class = "RibbonBarGroupDropDownBorder"; popupElement.Class = "RibbonBarGroupDropDownElement"; this.dropDownElement.DropDownMenu.RootElement.Class = "RibbonBarGroupDropDownRoot"; FillPrimitive fillPrimitive = new FillPrimitive(); fillPrimitive.Visibility = ElementVisibility.Collapsed; fillPrimitive.Class = "ChunkBodyFill"; this.dropDownElement.DropDownMenu.RootElement.Children.Add((RadElement)fillPrimitive); this.dropDownElement.Image = (Image)Telerik.WinControls.ResourceHelper.ImageFromResource(typeof(RadRibbonBarGroup), "Telerik.WinControls.UI.Resources.dropDown.png"); this.dropDownElement.DisplayStyle = DisplayStyle.ImageAndText; this.dropDownElement.TextImageRelation = TextImageRelation.ImageAboveText; this.dropDownElement.ShowArrow = false; this.dropDownElement.Margin = new Padding(4, 4, 4, 4); this.dropDownElement.ActionButton.BorderElement.Visibility = ElementVisibility.Hidden; this.dropDownElement.ActionButton.BorderElement.Class = "GroupDropDownButtonInnerBorder"; this.dropDownElement.ActionButton.Padding = new Padding(4, 10, 4, 28); int num7 = (int)this.dropDownElement.BindProperty(RadItem.TextProperty, (RadObject)this, RadItem.TextProperty, PropertyBindingOptions.OneWay); this.dropDownElement.DropDownOpening += new CancelEventHandler(this.dropDownElement_DropDownOpening); this.Children.Add((RadElement)this.dropDownElement); this.dropDownElement.ImageAlignment = ContentAlignment.MiddleCenter; this.dropDownElement.ThemeRole = "RibbonGroupDropDownButton"; this.Children.Add((RadElement)this.elementWithCaptionLayoutPanel); this.Children.Add((RadElement)this.borderPrimitive); this.Children.Add((RadElement)this.groupFill); this.items.Owner = (RadElement)this.stackLayoutPanel; this.items.ItemsChanged += new ItemChangedDelegate(this.ItemChanged); }
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); }
public RadDropDownButtonPopup(RadDropDownButtonElement ownerElement) : base(ownerElement) { }