The issue is caused by the fact that the drop down button has its own theming in RadDock, which gets applied to the newly added button. To reproduce: protected override void OnLoad(EventArgs e) { base.OnLoad(e); RadDockEvents.TabStripItemCreating += RadDockEvents_TabStripItemCreating; AddDock(); ThemeResolutionService.ApplicationThemeName = "VisualStudio2012Dark"; } void RadDockEvents_TabStripItemCreating(object sender, TabStripItemCreatingEventArgs args) { RadDropDownButtonElement btn = new RadDropDownButtonElement(); btn.Margin = new System.Windows.Forms.Padding(80, 5, 5, 5); btn.MinSize = new System.Drawing.Size(50, 20); btn.Items.Add(new RadMenuItem("asasda")); args.TabItem.Children.Add(btn); } Workaround: use the themes in the attachments
When you change the text of a ToolWindow programmatically, this setting is not reflected on the titlebar of the TabStrip. The same issue appears for the title bar of RadForm when the ToolWindow is floating. Another case of this issue can be encountered for the AutoHideTab when the ToolWindow is in autohide mode.
To reproduce: - Add some windows before adding loading the layout. Do not set the active window. If mDockForms Then Dim df1 As New Form Dim df2 As New Form Dim df3 As New Form df1.BackColor = Color.Red df1.Text = "Docked Form 1" df1.Name = "DockedForm1" df2.BackColor = Color.White df2.Text = "Docked Form 2" df2.Name = "DockedForm2" df3.BackColor = Color.Blue df3.Text = "Docked Form 3" df3.Name = "DockedForm3" RadDock1.DockControl(df1, Docking.DockPosition.Left) RadDock1.DockControl(df2, Docking.DockPosition.Left) RadDock1.DockControl(df3, Docking.DockPosition.Left) df1.Show() df2.Show() df3.Show() End If RadDock1.LoadFromXml(xmlfile) - Start the application, select a window and save the layout. - Load the layout and you will notice that the last window is active. Workaround: Me.RadDock1.ActiveWindow = RadDock1.DockControl(df3, Docking.DockPosition.Left) Woraround2 - Load the layout in empty RadDock and use it to retrieve the proper index: Dim rd2 As New Docking.RadDock rd2.LoadFromXml(xmlfile) For Each c As Control In rd2.Controls If TypeOf c Is Docking.ToolTabStrip Then RadDock1.ActiveWindow = CType(RadDock1.Controls(1), Docking.ToolTabStrip).TabPanels(CType(c, Docking.ToolTabStrip).SelectedIndex) End If Next
If you have a FloatingWindow with Name and Text set to "TestForm", save the layout and load it, you get a Dockplaceholder with default Name and Text "ToolWindow1". If you first dock the FloatingWindow, then float it again and finally save and load the layout, you get information both about the docked and floating windows in the xml.
To reproduce set AutoDetectMdiChildren to true and add a DocumentWindow to RadDock, using the AddDocument method Workaround: 1. Set AutoDetectMdiChildren to false 2. Use HostWindow instead of DocumentWindow
When RadDock.RightToLeft is Yes, the AutoHide tabs are positioned at the bottom of the AutoHideTabStrip, but not at the top.
To reproduce: 1.Add a RadForm with RibbonFormBehavior. 2.Add a RadDock with one DocumentWindow and a button inside the ribbon. 3.Create another RadForm with RibbonFormBehavior. 4.Use the following code snippet: public partial class Form1 : RadForm { public Form1() { InitializeComponent(); } private void radButtonElement1_Click(object sender, EventArgs e) { this.IsMdiContainer = true; this.radDock1.AutoDetectMdiChildren = true; ChildForm form = new ChildForm(); form.Text = "MDI Child 1"; form.MdiParent = this; form.Show(); } } Workaround: Set RadDock.AutoDetectMdiChildren property to false.
When the Form that contains RadDock is TopMost, the floating windows owned by the RadDock instance are not TopMost, so they go behind the form.
This request concerns adding a state for the buttons in the ToolWindow caption, which will allow different theming for the buttons, when the window is active and inactive.
When a form that contains a RadDock is TopMost, AutoHide windows are shown behind the form
RadSplitContainer designer is dependant on the RadDock assembly. This dependency should be removed. (ActionLists getter).
To reproduce: - Add RadDock with couple of tool windows to a blank form - Subscribe to the ActiveWindowChanged event. - Run the application and close all windows in the dock. - You will notice that the despite that the ActiveWindow property is set to null the event is not fired.
Let's have a form in a host window and then replace (on a button click) the form with another form, using the LoadContent() method. The text of the tab is changed accordingly, but there is no update on the text of the caption.
To reproduce: Add a ToolWindow to RadDock. AutoHide it: toolWindow1.AutoHide(); Then Hide it: toolWindow1.Hide(); And show it: toolWindow1.Show(); You will see that the window is docked but is not AutoHide Workaround: Call the AutoHide method instead of the Show method: toolWindow1.AutoHide();
An editor should appear at where the tabs of RadDock are when the end-user double-clicks the tabs or presses F2. This will allow him to change the text of the tabs.
To reproduce: - Dock a tool window in a black RadDock. - Drag and drop the toolwindow in the top, bottom, right or left docking guides in the center. - The tool window is docked as document window and fills the entire space. Workaround: public Form1() { InitializeComponent(); DragDropService service = this.radDock1.GetService<DragDropService>(); service.PreviewHitTest += service_PreviewHitTest; radDock1.DockStateChanged += radDock1_DockStateChanged; } void radDock1_DockStateChanged(object sender, DockWindowEventArgs e) { if (dropTarget is DocumentContainer) { if (position != null && position != "Fill") { e.DockWindow.DockState = DockState.Docked; switch (position) { case "Top": radDock1.DockWindow(e.DockWindow, DockPosition.Top); break; case "Left": radDock1.DockWindow(e.DockWindow, DockPosition.Left); break; case "Right": radDock1.DockWindow(e.DockWindow, DockPosition.Right); break; case "Bottom": radDock1.DockWindow(e.DockWindow, DockPosition.Bottom); break; } position = null; } } } string position = null; object dropTarget = null; void service_PreviewHitTest(object sender, DragDropHitTestEventArgs e) { if (e.HitTest.GuidePosition != null) { dropTarget = e.DropTarget; position = e.HitTest.DockPosition.Value.ToString(); Console.WriteLine(e.DropTarget); } }
The text alignment of DocumentTabs does not look good when the tabs are left aligned, the close button is visible and the text is vertically oriented (i.e. it looks horizontal when the tabs are aligned to the left). This would be best addressed if there is mechanism for rotating the Padding value of the Tabs when their alignment is different (left, top, etc.)
To reproduce: Create MDI form using RadDock by following the article: http://www.telerik.com/help/winforms/dock-mdi-mode-automatic-mdi-form-handling.html You will notice that the Closing and Closed events of the MdiForms will not be invoked. Workaround: Subscribe to the FormClosing event of the main Form and close all the windows manually: void Form1_FormClosing(object sender, FormClosingEventArgs e) { this.RadDock.CloseAllWindows(); }
ActiveWindowChanged cannot be canceled if the event is fired for the case where you switch from one tab of a ToolWindow to another tab of a ToolWindow