protected override void CreateChildElements()
        {
            base.CreateChildElements();
            dropDownMenu = new RadDropDownMenu();
            dropDownMenu.PopupOpening += delegate(object sender, CancelEventArgs args)
            {
                if (!this.RightToLeft)
                {
                    return;
                }

                RadPopupOpeningEventArgs e = args as RadPopupOpeningEventArgs;
                if (e != null)
                {
                    e.CustomLocation = new Point(e.CustomLocation.X - (this.dropDownMenu.Size.Width - this.Size.Width), e.CustomLocation.Y);
                }
            };

            dropDownMenu.PopupOpened += new RadPopupOpenedEventHandler(dropDownMenu_PopupOpened);
            dropDownMenu.PopupClosed += new RadPopupClosedEventHandler(dropDownMenu_PopupClosed);
            this.arrowButton          = new RadCommandBarArrowButton();
            //this is needed because RadCommandBarSplitButton inherits this class
            if (this.GetType() == typeof(CommandBarDropDownButton))
            {
                this.arrowButton.Class = "CommandBarDropDownButtonArrow";
            }

            arrowButton.MouseEnter += new EventHandler(arrowButton_MouseEnter);
            arrowButton.MouseLeave += new EventHandler(arrowButton_MouseLeave);
            this.Children.Add(arrowButton);
        }
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.dropDownMenu = new RadDropDownMenu((RadElement)this);
     this.dropDownMenu.HorizontalAlignmentCorrectionMode = AlignmentCorrectionMode.SnapToEdges;
     this.WireDropDownEvents();
     this.arrowButton             = new RadCommandBarArrowButton();
     this.arrowButton.Class       = "CommandBarDropDownButtonArrow";
     this.arrowButton.MouseEnter += new EventHandler(this.arrowButton_MouseEnter);
     this.arrowButton.MouseLeave += new EventHandler(this.arrowButton_MouseLeave);
     this.Children.Add((RadElement)this.arrowButton);
 }