The DocumentTabStrip raises the SelectedIndexChanging event twice
To reproduce: Add a RadDock to a form and a ToolWindow and set the ToolCaptionButtons to None. Now start the application and you will see that until you focus the ToolWindow, the buttons will be visible. Workaround: Set the ToolCaptionButtons property when the form loads: void CadHandler_Load(object sender, EventArgs e) { foreach (DockWindow window in this.radDock1.DockWindows) { window.ToolCaptionButtons = ToolStripCaptionButtons.None; } }
To reproduce: Add a RadDock with ToolWindow, AutoHide the window and open it. You will see that the splitter is big (12px width) and has a black border on the top left corner Workaround: Subscribe to the DockStateChanged event to hide the problematic element: void dock_DockStateChanged(object sender, DockWindowEventArgs e) { if (e.DockWindow.DockState == DockState.AutoHide) { ((e.DockWindow as ToolWindow).TabStripItem.TabPanel.Parent as AutoHideTabStrip).SplitPanelElement.Children[2].Children[0].Visibility = ElementVisibility.Collapsed; } }
To reproduce: Add a RadDock to a form and every few seconds remove it and add a new one. You will see that the memory will increase. Apparently RadDock has subscribed to the Resize event of the parent form but does not unsubscribe when disposed. Workaround: Unsubscribe from the Resize event of the form prior disposing RadDock: var ctrl = this.Controls["editor"]; var eventInfo = this.GetType().GetEvent("Resize"); var handlerMethod = typeof(RadDock).GetMethod("parentForm_Resize", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); var eventDelegate = Delegate.CreateDelegate(eventInfo.EventHandlerType, ctrl.Controls["radDock1"], handlerMethod); eventInfo.RemoveEventHandler(this, eventDelegate); this.Controls.Remove(ctrl); ctrl.Dispose();
When you add a few DocumentWindows to RadDock and you undock one of them to a floating window, then undock another one in the same floating window you will see two tabs. In the main area the selected tab is bolded, the functionality should be the same in the floating windows For the time being use the following code to manually bold the tabs: this.RadDock.FloatingWindowCreated += RadDock_FloatingWindowCreated; ... void RadDock_FloatingWindowCreated(object sender, FloatingWindowEventArgs e) { e.Window.Controls[0].ControlAdded += Form1_ControlAdded; } void Form1_ControlAdded(object sender, ControlEventArgs e) { DocumentTabStrip tabStrip = e.Control as DocumentTabStrip; tabStrip.ControlAdded -= Form1_ControlAdded; if (tabStrip != null) { tabStrip.SelectedIndexChanged += tabStrip_SelectedIndexChanged; } } void tabStrip_SelectedIndexChanged(object sender, EventArgs e) { DocumentTabStrip tabStrip = sender as DocumentTabStrip; if (tabStrip != null) { foreach (DocumentWindow item in tabStrip.Controls) { item.TabStripItem.ResetValue(RadItem.FontProperty, ValueResetFlags.Local); } tabStrip.SelectedTab.TabStripItem.Font = new Font(tabStrip.SelectedTab.Font.FontFamily, tabStrip.SelectedTab.Font.Size, FontStyle.Bold); } }
To reproduce: Add a RadDock and two ToolWindows. Drag the tool windows out and leave on on top of the RadDock, drag the other over the first tool window and you will notice drag hints from both - the RadDock and the ToolWindow
To reproduce: Add RadDock and ToolWindow to the RadDock and dock it. Start the application and drag out the ToolWindow. You will notice that when you try to drag it back in the RadDock you are not able to.
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.
To reproduce: Add a RadDock and two ToolWindows with many controls inside (~100). Drag out the one toolwindow and dock it back by dragging. Now drag it out again and dock it by clicking in its title bar and clicking Docked. You will notice that the second way is faster.
To reproduce: Add a RadDock to a Form, add two ToolWindows and dock them. Drag out one of the toolwindows to the edge of the other one until the drag hint is selected and continue dragging out of the form. You will notice that the drag hint is still selected.
To reproduce: add two ToolWindows and several DocumenWindows. Use the following code snippet: public Form1() { InitializeComponent(); this.toolWindow1.AutoHide(); this.toolWindow2.AutoHide(); while (this.documentTabStrip1.TabPanels.Count > 0) { documentTabStrip1.TabPanels.Remove(documentTabStrip1.TabPanels[0]); } TabPanel tabPanel = new TabPanel(); tabPanel.Text = @"New Tab"; documentTabStrip1.TabPanels.Add(tabPanel); } Run the application and hover one of the Autohidden ToolWindows. Workaround: do not add TabPanel. Use the desired DocumentWindow or ToolWindow instead
To reproduce: 1.Add a RadDock with a ToolWindow and a DocumentWindow. Add several controls to all windows. Use the following code: protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (System.IO.File.Exists(@"..\..\..\layoutTest.xml")) this.radDock1.LoadFromXml(@"..\..\..\layoutTest.xml"); } protected override void OnClosing(CancelEventArgs e) { this.radDock1.SaveToXml(@"..\..\..\layoutTest.xml"); base.OnClosing(e); } 2. Run the application and change the current layout. 3. Close the form and run the application again. The controls which belong to the RadDock's DocumentWindow disappear from the dialog. Workaround: class MyDock : RadDock { protected override void LoadFromXmlCore(System.Xml.XmlReader reader, bool oldXmlFormat) { //stop the base logic //base.LoadFromXmlCore(reader, oldXmlFormat); if (reader == null) { return; } this.ActiveWindow = null; FieldInfo prevActiveWindow = typeof(RadDock).GetField("prevActiveWindow", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField); prevActiveWindow.SetValue(this, null); //this.prevActiveWindow = null; FieldInfo attachedWindows = typeof(RadDock).GetField("attachedWindows", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); SortedList<string, DockWindow> _attachedWindows = attachedWindows.GetValue(this) as SortedList<string, DockWindow>; MethodInfo CleanAutoHideTabs = typeof(RadDock).GetMethod("CleanAutoHideTabs", System.Reflection.BindingFlags.NonPublic | BindingFlags.Instance); CleanAutoHideTabs.Invoke(this, new object[] { _attachedWindows.Values, true }); //this.CleanAutoHideTabs(this.attachedWindows.Values, true); MethodInfo ResetDesiredDockState = typeof(RadDock).GetMethod("ResetDesiredDockState", System.Reflection.BindingFlags.NonPublic | BindingFlags.Instance); ResetDesiredDockState.Invoke(this, null); //this.ResetDesiredDockState(); MethodInfo OnLoadingFromXML = this.DocumentManager.GetType().GetMethod("OnLoadingFromXML", System.Reflection.BindingFlags.NonPublic | BindingFlags.Instance); OnLoadingFromXML.Invoke(this.DocumentManager, null); //this.DocumentManager.OnLoadingFromXML(); if (oldXmlFormat) { this.BeginTransactionBlock(false); MethodInfo LoadFromOldXml = typeof(RadDock).GetMethod("LoadFromOldXml", System.Reflection.BindingFlags.NonPublic | BindingFlags.Instance); LoadFromOldXml.Invoke(this, new object[] {reader}); // this.LoadFromOldXml(reader); this.EndTransactionBlock(); } else { MethodInfo LoadFromNewXml = typeof(RadDock).GetMethod("LoadFromNewXml", System.Reflection.BindingFlags.NonPublic | BindingFlags.Instance); LoadFromNewXml.Invoke(this, new object[] { reader }); // this.LoadFromNewXml(reader); } this.EnsureInitialized(); this.OnLoadedFromXml(); } public override string ThemeClassName { get { return typeof(RadDock).FullName; } } }
If you set the CurrentCulture to tr-TR, you will notice that an unwanted black border appears in the FloatingWindow of RadDock. This scenario should be tested with the whole suite.
Tooltip text inconsistency between the dock's buttons.After hovering contiguously two neighbour buttons, their tooltip text is swapped.
If you hide a DocumentWindow and save the layout, the loaded layout shows the DocumentWindow, but it actually should keep it hidden. Same behavior is valid for ToolWindow.
Let's have a TextBox, ToolTip and a FloatingWindow containing the TextBox. The following code snippet will not show a tooltip for the textbox: this.toolTip1.ToolTipTitle = "ToolTip"; string strToolTip = "Exemple"; this.toolTip1.SetToolTip(textBox1, strToolTip); this.toolTip1.AutoPopDelay = 32767; this.toolTip1.Active = true;
Place a RadTextBox on a Form and sets its Anchor to Left, Top, Right. Let's say this form is a MDI child and RadDock hosts it. You will notice that the RadTextBox appears with a wrong size and a part of it is actually invisible.
If you try to set this this.toolWindow4.TabStrip.SizeInfo.SizeMode = SplitPanelSizeMode.Absolute , the TabStrip will not stay fixed if the form containing RadDock is resized. However, if you hide the main document container, this setting will start working.
Let's have a RadDock control hosting several MDI child forms. Set the MDIParent property of these forms to null. The forms will become top level windows, but the HostWindows will not be removed and RadDock will continue listening to the events of the forms. MDIChildren will still contains the forms as well.