protected override void CreateChildElements()
        {
            this.internalLayoutPanel       = (ImageAndTextLayoutPanel) new MenuImageAndTextLayout();
            this.internalLayoutPanel.Class = "RadMenuItemInternalLayoutPanel";
            this.Children.Add((RadElement)this.internalLayoutPanel);
            this.checkmark = new RadMenuCheckmark();
            int num1 = (int)this.checkmark.SetValue(ImageAndTextLayoutPanel.IsImagePrimitiveProperty, (object)true);

            this.checkmark.Alignment = ContentAlignment.MiddleCenter;
            this.checkmark.CheckElement.Alignment = ContentAlignment.MiddleCenter;
            this.checkmark.CheckElement.Class     = "RadMenuItemCheckPrimitive";
            this.internalLayoutPanel.Children.Add((RadElement)this.checkmark);
            this.imagePrimitive = new ImagePrimitive();
            int num2 = (int)this.imagePrimitive.SetValue(RadCheckmark.IsImageProperty, (object)true);

            this.imagePrimitive.Class     = "RadMenuItemImagePrimitive";
            this.imagePrimitive.Alignment = ContentAlignment.MiddleCenter;
            this.imagePrimitive.ZIndex    = this.checkmark.ZIndex + 1;
            this.checkmark.Children.Add((RadElement)this.imagePrimitive);
            this.textPanel = new StackLayoutPanel();
            this.textPanel.StretchHorizontally = false;
            this.textPanel.StretchVertically   = false;
            this.textPanel.Class              = "RadMenuItemTextPanel";
            this.textPanel.Orientation        = Orientation.Vertical;
            this.textPanel.EqualChildrenWidth = true;
            int num3 = (int)this.textPanel.SetValue(ImageAndTextLayoutPanel.IsTextPrimitiveProperty, (object)true);

            this.internalLayoutPanel.Children.Add((RadElement)this.textPanel);
            this.textPrimitive = new TextPrimitive();
            int num4 = (int)this.textPrimitive.SetValue(ImageAndTextLayoutPanel.IsTextPrimitiveProperty, (object)true);

            this.textPrimitive.Class = "RadMenuItemTextPrimitive";
            this.textPanel.Children.Add((RadElement)this.textPrimitive);
            this.textSeparator            = new LinePrimitive();
            this.textSeparator.Class      = "RadMenuItemTextSeparator";
            this.textSeparator.Visibility = ElementVisibility.Collapsed;
            this.textPanel.Children.Add((RadElement)this.textSeparator);
            this.descriptionTextPrimitive       = new TextPrimitive();
            this.descriptionTextPrimitive.Class = "RadMenuItemDescriptionText";
            this.textPanel.Children.Add((RadElement)this.descriptionTextPrimitive);
            this.shortcutTextPrimitive            = new TextPrimitive();
            this.shortcutTextPrimitive.Class      = "RadMenuItemShortcutPrimitive";
            this.shortcutTextPrimitive.Visibility = ElementVisibility.Collapsed;
            this.Children.Add((RadElement)this.shortcutTextPrimitive);
            this.arrowPrimitive               = new ArrowPrimitive();
            this.arrowPrimitive.Visibility    = ElementVisibility.Hidden;
            this.arrowPrimitive.Direction     = this.RightToLeft ? Telerik.WinControls.ArrowDirection.Left : Telerik.WinControls.ArrowDirection.Right;
            this.arrowPrimitive.Alignment     = ContentAlignment.MiddleLeft;
            this.arrowPrimitive.Class         = "RadMenuItemArrowPrimitive";
            this.arrowPrimitive.SmoothingMode = SmoothingMode.Default;
            this.arrowPrimitive.MinSize       = Size.Empty;
            this.arrowPrimitive.MaxSize       = Size.Empty;
            this.Children.Add((RadElement)this.arrowPrimitive);
        }
        protected override void CreateChildElements()
        {
            // fill
            this.fillPrimitive               = new FillPrimitive();
            this.fillPrimitive.Class         = "RadMenuItemFillPrimitive";
            this.fillPrimitive.Name          = "MenuComboItemFill";
            this.fillPrimitive.BackColor     = Color.Empty;
            this.fillPrimitive.GradientStyle = GradientStyles.Solid;
            this.Children.Add(this.fillPrimitive);

            // border
            this.borderPrimitive            = new BorderPrimitive();
            this.borderPrimitive.Visibility = ElementVisibility.Visible;
            this.borderPrimitive.Class      = "RadMenuItemBorderPrimitive";
            this.borderPrimitive.Name       = "MenuComboItemBorder";
            this.Children.Add(this.borderPrimitive);



            // light visual element
            this.menuElement                   = new LightVisualElement();
            this.menuElement.MinSize           = new Size(100, 20);
            this.menuElement.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.menuElement.TextAlignment     = ContentAlignment.MiddleLeft;
            this.menuElement.ImageAlignment    = ContentAlignment.MiddleLeft;
            this.menuElement.ImageLayout       = ImageLayout.Stretch;

            //  this.menuElement.
            this.menuElement.MaxSize     = new Size(0, 16);
            this.menuElement.MinSize     = new Size(0, 16);
            this.menuElement.MouseEnter += new EventHandler(menuElement_MouseEnter);
            this.menuElement.MouseLeave += new EventHandler(menuElement_MouseLeave);
            this.menuElement.Click      += new EventHandler(menuElement_Click);
            this.Children.Add(this.menuElement);

            // Disable the showing of the ComboBox's popup in design-time
            if (this.DesignMode)
            {
                this.menuElement.RoutedEventBehaviors.Add(new CancelMouseBehavior());
            }

            // checkmark
            this.menuCheckMark           = new RadMenuCheckmark();
            this.menuCheckMark.MinSize   = new Size(13, 13);
            this.menuCheckMark.Alignment = ContentAlignment.MiddleCenter;
            this.menuCheckMark.CheckElement.Alignment = ContentAlignment.MiddleCenter;
            this.menuCheckMark.Class = "RadMenuItemCheckPrimitive";
            this.menuCheckMark.NotifyParentOnMouseInput = false;

            this.Children.Add(this.menuCheckMark);
        }
 protected override void CreateChildElements()
 {
     this.fillPrimitive               = new FillPrimitive();
     this.fillPrimitive.Class         = "RadMenuItemFillPrimitive";
     this.fillPrimitive.Name          = "MenuComboItemFill";
     this.fillPrimitive.BackColor     = Color.Empty;
     this.fillPrimitive.GradientStyle = GradientStyles.Solid;
     this.Children.Add((RadElement)this.fillPrimitive);
     this.borderPrimitive            = new BorderPrimitive();
     this.borderPrimitive.Visibility = ElementVisibility.Visible;
     this.borderPrimitive.Class      = "RadMenuItemBorderPrimitive";
     this.borderPrimitive.Name       = "MenuComboItemBorder";
     this.Children.Add((RadElement)this.borderPrimitive);
     this.menuElement                   = new LightVisualElement();
     this.menuElement.MinSize           = new Size(100, 20);
     this.menuElement.TextImageRelation = TextImageRelation.ImageBeforeText;
     this.menuElement.TextAlignment     = ContentAlignment.MiddleLeft;
     this.menuElement.ImageAlignment    = ContentAlignment.MiddleLeft;
     this.menuElement.ImageLayout       = ImageLayout.Stretch;
     this.menuElement.MaxSize           = new Size(0, 16);
     this.menuElement.MinSize           = new Size(0, 16);
     this.menuElement.MouseEnter       += new EventHandler(this.menuElement_MouseEnter);
     this.menuElement.MouseLeave       += new EventHandler(this.menuElement_MouseLeave);
     this.menuElement.Click            += new EventHandler(this.menuElement_Click);
     this.Children.Add((RadElement)this.menuElement);
     if (this.DesignMode)
     {
         this.menuElement.RoutedEventBehaviors.Add((RoutedEventBehavior) new RadCommandBarOverflowMenuItem.CancelMouseBehavior());
     }
     this.menuCheckMark           = new RadMenuCheckmark();
     this.menuCheckMark.MinSize   = new Size(13, 13);
     this.menuCheckMark.Alignment = ContentAlignment.MiddleCenter;
     this.menuCheckMark.CheckElement.Alignment = ContentAlignment.MiddleCenter;
     this.menuCheckMark.Class = "RadMenuItemCheckPrimitive";
     this.menuCheckMark.NotifyParentOnMouseInput = false;
     this.Children.Add((RadElement)this.menuCheckMark);
 }
        protected override void CreateChildElements()
        {
            // text image relation
            this.internalLayoutPanel       = new MenuImageAndTextLayout();
            this.internalLayoutPanel.Class = "RadMenuItemInternalLayoutPanel";
            this.Children.Add(this.internalLayoutPanel);

            // checkbox
            this.checkmark = new RadMenuCheckmark();
            this.checkmark.SetValue(ImageAndTextLayoutPanel.IsImagePrimitiveProperty, true);
            this.checkmark.Alignment = ContentAlignment.MiddleCenter;
            this.checkmark.CheckElement.Alignment = ContentAlignment.MiddleCenter;
            this.checkmark.CheckElement.Class     = "RadMenuItemCheckPrimitive";
            this.internalLayoutPanel.Children.Add(this.checkmark);

            // image
            this.imagePrimitive = new ImagePrimitive();
            this.imagePrimitive.SetValue(RadCheckmark.IsImageProperty, true);
            this.imagePrimitive.Class     = "RadMenuItemImagePrimitive";
            this.imagePrimitive.Alignment = ContentAlignment.MiddleCenter;
            this.imagePrimitive.ZIndex    = this.checkmark.ZIndex + 1;
            this.checkmark.Children.Add(this.imagePrimitive);

            // menu text + separator + description in a vertical stack panel
            textPanel = new StackLayoutPanel();
            textPanel.StretchHorizontally = false;
            textPanel.StretchVertically   = false;
            textPanel.Class              = "RadMenuItemTextPanel";
            textPanel.Orientation        = Orientation.Vertical;
            textPanel.EqualChildrenWidth = true;
            textPanel.SetValue(ImageAndTextLayoutPanel.IsTextPrimitiveProperty, true);
            this.internalLayoutPanel.Children.Add(textPanel);

            // text
            this.textPrimitive = new TextPrimitive();
            this.textPrimitive.SetValue(ImageAndTextLayoutPanel.IsTextPrimitiveProperty, true);
            this.textPrimitive.Class = "RadMenuItemTextPrimitive";
            textPanel.Children.Add(textPrimitive);

            // separator
            textSeparator            = new LinePrimitive();
            textSeparator.Class      = "RadMenuItemTextSeparator";
            textSeparator.Visibility = ElementVisibility.Collapsed;
            textPanel.Children.Add(textSeparator);

            // description
            this.descriptionTextPrimitive       = new TextPrimitive();
            this.descriptionTextPrimitive.Class = "RadMenuItemDescriptionText";
            textPanel.Children.Add(this.descriptionTextPrimitive);

            // shortcuttext
            this.shortcutTextPrimitive            = new TextPrimitive();
            this.shortcutTextPrimitive.Class      = "RadMenuItemShortcutPrimitive";
            this.shortcutTextPrimitive.Visibility = ElementVisibility.Collapsed;
            this.Children.Add(this.shortcutTextPrimitive);

            // arrow
            this.arrowPrimitive               = new ArrowPrimitive();
            this.arrowPrimitive.Visibility    = ElementVisibility.Hidden;
            this.arrowPrimitive.Direction     = (this.RightToLeft) ? ArrowDirection.Left : ArrowDirection.Right;
            this.arrowPrimitive.Alignment     = ContentAlignment.MiddleLeft;
            this.arrowPrimitive.Class         = "RadMenuItemArrowPrimitive";
            this.arrowPrimitive.SmoothingMode = SmoothingMode.Default;
            this.arrowPrimitive.MinSize       = Size.Empty;
            this.arrowPrimitive.MaxSize       = Size.Empty;
            this.Children.Add(this.arrowPrimitive);
        }