/// <summary> /// /// </summary> /// <param name="parent"></param> protected override void CreateChildItems(RadElement parent) { base.CreateChildItems(parent); this.documentButtonsLayout = new DockLayoutPanel(); this.documentButtonsLayout.Class = "documentButtonsLayout"; this.documentButtonsLayout.StretchHorizontally = false; this.documentButtonsLayout.StretchVertically = false; this.documentButtonsLayout.Alignment = ContentAlignment.TopRight; this.documentButtonsLayout.ZIndex = 10; this.documentButtonsLayout.Margin = new Padding(0, 2, 0, 0); //window.Children.Add(documentButtonsLayout); this.splitPanelElement.Children.Add(documentButtonsLayout); this.tabStripElement.ContentArea.Visibility = ElementVisibility.Visible; this.closeButton = new RadButtonElement(); this.closeButton.Class = "CloseButton"; this.closeButton.ButtonFillElement.Class = "CloseButtonFill"; this.closeButton.SetDefaultValueOverride(RadElement.MarginProperty, new System.Windows.Forms.Padding(0, 0, 2, 0)); this.closeButton.ClickMode = ClickMode.Release; this.closeButton.Click += new EventHandler(closeButton_Click); this.closeButton.ZIndex = 5; this.closeButton.StretchHorizontally = false; this.closeButton.StretchVertically = false; DockLayoutPanel.SetDock(closeButton, Telerik.WinControls.Layouts.Dock.Right); this.documentButtonsLayout.Children.Add(closeButton); this.overflowMenuButton = new OverflowDropDownButtonElement(); this.overflowMenuButton.SetDefaultValueOverride(RadElement.MarginProperty, new System.Windows.Forms.Padding(0, 0, 2, 0)); this.overflowMenuButton.ImageAlignment = System.Drawing.ContentAlignment.MiddleRight; this.overflowMenuButton.ShowArrow = false; this.overflowMenuButton.Class = "OverflowDropDownButton"; this.overflowMenuButton.DisplayStyle = DisplayStyle.Image; this.overflowMenuButton.BorderElement.Visibility = ElementVisibility.Collapsed; this.overflowMenuButton.ActionButton.Class = "OverflowDropDownActionButton"; this.overflowMenuButton.ActionButton.ButtonFillElement.Class = "OverflowDropDownButtonFill"; this.overflowMenuButton.StretchHorizontally = false; this.overflowMenuButton.StretchVertically = false; this.overflowMenuButton.MouseDown += new System.Windows.Forms.MouseEventHandler(activeDocumentsMenuDropDownButton_MouseDown); this.overflowMenuButton.ZIndex = 10; DockLayoutPanel.SetDock(overflowMenuButton, Telerik.WinControls.Layouts.Dock.Right); this.documentButtonsLayout.Children.Add(this.overflowMenuButton); this.tabStripElement.Alignment = ContentAlignment.TopLeft; this.tabStripElement.StripAlignment = StripViewAlignment.Top; this.tabStripElement.AllowDrag = true; this.splitPanelElement.Visibility = ElementVisibility.Hidden; this.tabStripElement.ItemContainer.BringToFront(); this.SetToolTips(); }
private void CreateCaption() { this.caption = new ToolWindowCaptionElement(); this.caption.Class = "ToolWindowCaption"; this.caption.RadPropertyChanged += new RadPropertyChangedEventHandler(caption_RadPropertyChanged); this.captionFill = new FillPrimitive(); this.captionFill.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.captionFill.Class = "TitleFill"; this.caption.Children.Add(this.captionFill); this.captionBorder = new BorderPrimitive(); this.captionBorder.Class = "TitleBorder"; this.caption.Children.Add(this.captionBorder); this.captionLayout = new DockLayoutPanel(); this.captionLayout.Class = "CaptionButtonsLayout"; this.captionLayout.Margin = new Padding(0, 2, 0, 2); this.caption.Children.Add(this.captionLayout); this.closeButton = new RadButtonElement(); this.closeButton.SetDefaultValueOverride(RadElement.MarginProperty, new Padding(1, 0, 1, 0)); this.closeButton.Class = "CloseButton"; this.closeButton.ButtonFillElement.Class = "CloseButtonFill"; this.closeButton.MinSize = new Size(7, 7); this.closeButton.ClickMode = ClickMode.Release; this.closeButton.Click += new EventHandler(captionCloseButton_Click); DockLayoutPanel.SetDock(this.closeButton, Telerik.WinControls.Layouts.Dock.Right); this.captionLayout.Children.Add(closeButton); this.autoHideButton = new RadToggleButtonElement(); this.autoHideButton.Class = "AutoHideButton"; this.autoHideButton.ButtonFillElement.Class = "AutoHideButtonFill"; this.autoHideButton.MinSize = new Size(7, 7); this.autoHideButton.SetDefaultValueOverride(RadElement.MarginProperty, new Padding(1, 0, 1, 0)); this.autoHideButton.ClickMode = ClickMode.Release; this.autoHideButton.ToggleState = ToggleState.On; this.autoHideButton.Click += new EventHandler(captionAutoHideButton_Click); DockLayoutPanel.SetDock(this.autoHideButton, Telerik.WinControls.Layouts.Dock.Right); this.captionLayout.Children.Add(autoHideButton); this.actionMenuButton = new OverflowDropDownButtonElement(); this.actionMenuButton.SetDefaultValueOverride(RadElement.MarginProperty, new Padding(1, 0, 1, 0)); this.actionMenuButton.ImageAlignment = System.Drawing.ContentAlignment.MiddleRight; this.actionMenuButton.ShowArrow = false; this.actionMenuButton.Class = "SystemDropDownButton"; this.actionMenuButton.ActionButton.ButtonFillElement.Class = "SystemDropDownButtonFill"; this.actionMenuButton.ActionButton.Class = "SystemDropDownActionButton"; this.actionMenuButton.MinSize = new Size(7, 7); this.actionMenuButton.DisplayStyle = DisplayStyle.Image; this.actionMenuButton.Text = ""; this.actionMenuButton.BorderElement.Visibility = ElementVisibility.Collapsed; this.actionMenuButton.MouseDown += new MouseEventHandler(captionSystemDownButton_MouseDown); DockLayoutPanel.SetDock(this.actionMenuButton, Telerik.WinControls.Layouts.Dock.Right); this.captionLayout.Children.Add(this.actionMenuButton); this.captionText = new TextPrimitive(); this.captionText.Text = "ToolTabStrip"; this.captionText.Class = "TitleCaption"; this.captionText.StretchHorizontally = true; this.captionText.StretchVertically = true; this.captionText.TextAlignment = ContentAlignment.MiddleLeft; DockLayoutPanel.SetDock(this.captionText, Telerik.WinControls.Layouts.Dock.Left); this.captionLayout.Children.Add(captionText); }