Use attached project to reproduce. Workaround: https://docs.telerik.com/devtools/winforms/dock/object-model/customizing-tabstrip-items#documenttabstrip-multi-line-row-layout-with-a-custom-tab-shape
Please use attached project and try the following: 1. Run the application and move toolWindow3 from right to the bottom panel. 2. Hide toolWindow3 by 'Toggle' menu item or just close it. 3. Save the layout pressing 'Save' menu item. 4. Close the application and run it again. 5. Restore layout using 'Init' menu item. 6. Press 'Toggle' menu item to show toolWindow3. Workaround: Make the window visible before loading the layout.
If you drag a regular form to the top of the screen it will be maximized. This should work with the floating window as well.
The expected behavior should be similar to Visual Studio, once a maximized floating window starts being dragged it should go to a normal state so that the window under it is visible. How to reproduce: just maximize a floating window, then start dragging it from the title bar, the docking guides will appear which do not help much since the window is still maximized. Workaround: handle the Starting event of the DragDropService and change the WindowState of the window public partial class Form1 : Form { public Form1() { InitializeComponent(); DragDropService service = this.radDock1.GetService<DragDropService>(); service.Starting += Service_Starting; } private void Service_Starting(object sender, StateServiceStartingEventArgs e) { FloatingWindow fw = e.Context as FloatingWindow; if (fw != null && fw.WindowState == FormWindowState.Maximized) { fw.WindowState = FormWindowState.Normal; fw.Location = new Point(Cursor.Position.X - fw.Size.Width / 2, Cursor.Position.Y); } } }
To reproduce: ThemeResolutionService.ApplicationThemeName = "FluentDark"; this.documentTabStrip1.TabStripAlignment = Telerik.WinControls.UI.TabStripAlignment.Left; this.documentTabStrip1.TabStripTextOrientation = Telerik.WinControls.UI.TabStripTextOrientation.Vertical; Workaround: this.documentTabStrip1.TabStripElement.ItemBorderAndFillOrientation = Telerik.WinControls.UI.PageViewContentOrientation.Horizontal;
The attached videos demonstrate the present behavior and the desired one How to reproduce: public partial class Form1 : Form { public Form1() { InitializeComponent(); this.radDock1.EnableFloatingWindowSnapping = true; DragDropService svc = this.radDock1.GetService<DragDropService>(); svc.DragDropMode = DragDropMode.Preview; } }
When a document tab is already current, if the user clicks and holds the mouse button on the this tab label, the sibling tab is brought to the front and overlays it visually, so the corners of tab2 obscure the edges of tab1.
Workaround: ContextMenuService menuService = this.radDock1.GetService<ContextMenuService>(); menuService.ContextMenuDisplaying += menuService_ContextMenuDisplaying; private void menuService_ContextMenuDisplaying(object sender, ContextMenuDisplayingEventArgs e) { foreach (RadMenuItem listMenuItem in e.MenuItems) { TextPrimitive textPrimitive = listMenuItem.Layout.TextPanel.Children[0] as TextPrimitive; textPrimitive.UseMnemonic = false; } }
Use the attached project to reproduce. Workaround: radDock1.DocumentManager.BoldActiveDocument = false;
This property should be inherited by all tool, document, floating and autohide windows.
RadDock's layout does not handle correctly changed Windows DPI settings.
To reproduce: Open the attached project and press Ctrl+ Tab in the first text box. Since the textboxes are accepting the Tab, Ctrl + Tab should move to the other control. Workaround // RadTextBox private void TextBoxItem_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { if ((e.KeyData & Keys.Tab) == Keys.Tab && (e.KeyData & Keys.Control) == Keys.Control) { e.IsInputKey = true; var item = sender as RadTextBoxItem; this.SelectNextControl(item.HostedControl, true, true, true, true); } } //RadTextBoxControl private void RadTextBoxControl1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { if ((e.KeyData & Keys.Tab) == Keys.Tab && (e.KeyData & Keys.Control) == Keys.Control) { e.IsInputKey = true; this.SelectNextControl(sender as RadTextBoxControl, true, true, true, true); } }
Workrarund: If possible create tool-windows with added user controls public static ContentUserControl CreateContentUserControl(RadDock dock) { ContentUserControl uc = new ContentUserControl(); if (dock != null) { ToolWindow hostWindow = new ToolWindow("ContentUserControl"); hostWindow.Controls.Add(uc); hostWindow.Name = uc.Name; dock.FloatWindow(hostWindow); } return uc; }
To reproduce: please refer to the attached sample project and follow the steps illustrated in the gif file. Workaround: after loading the layout, set the MaximumSize for the FloatingWindow: public RadForm1() { InitializeComponent(); this.radDock1.FloatingWindowCreated += radDock1_FloatingWindowCreated; } Size lastSize = Size.Empty; private void radDock1_FloatingWindowCreated(object sender, Telerik.WinControls.UI.Docking.FloatingWindowEventArgs e) { lastSize= e.Window.Size; } private void button1_Click(object sender, EventArgs e) { int reps; if (!int.TryParse(radMaskedEditBox1.Text, out reps)) { MessageBox.Show(this, "Enter a valid number for repititions."); return; } using (var dockLayout = new MemoryStream()) { for (int i = 0; i < reps; i++) { dockLayout.SetLength(0); radDock1.SaveToXml(dockLayout); radDock1.LoadFromXml(dockLayout); foreach (Telerik.WinControls.UI.Docking.FloatingWindow fw in this.radDock1.ActiveFloatingWindows) { fw.MaximumSize = lastSize; } } } }
How to reproduce: try resizing a too window using its splitter Workaround: create a custom RadDock using special layout strategy public class MyRadDock : RadDock { public override string ThemeClassName { get { return typeof(RadDock).FullName; } } protected override SplitContainerLayoutStrategy CreateLayoutStrategy() { MySplitContainerLayoutStrategy strategy = null; if (this.LayoutStrategyType != null) { try { strategy = Activator.CreateInstance(this.LayoutStrategyType) as MySplitContainerLayoutStrategy; } catch { strategy = null; } } if (strategy == null) { strategy = new MySplitContainerLayoutStrategy(); } strategy.RootContainerType = typeof(RadDock); return strategy; } } public class MySplitContainerLayoutStrategy : SplitContainerLayoutStrategy { protected override void Measure() { SplitContainerLayoutInfo layoutInfo = (SplitContainerLayoutInfo)typeof(SplitContainerLayoutStrategy).GetField("layoutInfo", BindingFlags.Instance | BindingFlags.NonPublic). GetValue(this); SplitPanel fillPanel = (SplitPanel)typeof(SplitContainerLayoutInfo).GetField("fillPanel", BindingFlags.Instance | BindingFlags.NonPublic). GetValue(layoutInfo); if (fillPanel == null) { base.Measure(); } this.MeasureWithFillPanel(); typeof(SplitContainerLayoutStrategy).GetMethod("ClampMeasuredLength", BindingFlags.Instance | BindingFlags.NonPublic). Invoke(this, new object[] { }); } private void MeasureWithFillPanel() { FieldInfo layoutInfoFi = typeof(SplitContainerLayoutStrategy).GetField("layoutInfo", BindingFlags.Instance | BindingFlags.NonPublic); SplitContainerLayoutInfo layoutInfo = (SplitContainerLayoutInfo)layoutInfoFi.GetValue(this); int availableLength = (int)typeof(SplitContainerLayoutInfo).GetField("availableLength", BindingFlags.Instance | BindingFlags.NonPublic). GetValue(layoutInfo); int remaining = availableLength; SplitPanel panel; //calculate the desired size of all non-fill panels int desiredNonFillLength = 0; List<SplitPanel> layoutTargets = (List<SplitPanel>)typeof(SplitContainerLayoutInfo).GetField("layoutTargets", BindingFlags.Instance | BindingFlags.NonPublic). GetValue(layoutInfo); SplitPanel fillPanel = (SplitPanel)typeof(SplitContainerLayoutInfo).GetField("fillPanel", BindingFlags.Instance | BindingFlags.NonPublic). GetValue(layoutInfo); int count = layoutTargets.Count; for (int i = 0; i < count; i++) { panel = layoutTargets[i]; if (panel == fillPanel) { continue; } desiredNonFillLength += this.GetLength(panel.SizeInfo.AbsoluteSize); } SplitPanelSizeInfo fillInfo = fillPanel.SizeInfo; int totalSplitterLength = (int)typeof(SplitContainerLayoutInfo).GetField("totalSplitterLength", BindingFlags.Instance | BindingFlags.NonPublic). GetValue(layoutInfo); int layoutableLength = availableLength - totalSplitterLength; int correction = 0; int totalMinLength = (int)typeof(SplitContainerLayoutInfo).GetField("totalMinLength", BindingFlags.Instance | BindingFlags.NonPublic). GetValue(layoutInfo); int desiredFillLength = totalMinLength; if (desiredNonFillLength + desiredFillLength > layoutableLength) { correction = (desiredNonFillLength + desiredFillLength) - layoutableLength; } int remainingCorrection = correction; for (int i = 0; i < layoutTargets.Count; i++) { panel = layoutTargets[i]; if (panel == fillPanel) { continue; } int length = this.GetLength(TelerikDpiHelper.ScaleSize(panel.SizeInfo.AbsoluteSize, new SizeF(1f / panel.SplitPanelElement.DpiScaleFactor.Width, 1f / panel.SplitPanelElement.DpiScaleFactor.Height))); if (remainingCorrection > 0 && panel.SizeInfo.SizeMode != SplitPanelSizeMode.Absolute) { float factor = (float)length / desiredNonFillLength; int panelCorrection = Math.Max(1, (int)(factor * correction)); remainingCorrection -= panelCorrection; length -= panelCorrection; } panel.SizeInfo.MeasuredLength = length; int splitterLength = (int)typeof(SplitContainerLayoutInfo).GetField("splitterLength", BindingFlags.Instance | BindingFlags.NonPublic). GetValue(layoutInfo); remaining -= (panel.SizeInfo.MeasuredLength + splitterLength); } fillPanel.SizeInfo.MeasuredLength = remaining; } }
To reproduce: - Auto-hide some windows to the left. - Save the layout - Load the layout - The auto-hide popup is shown.
Please refer to the attached sample project and follow the steps in the gif file. The issue appears when the ToolWindow DockState is set to auto-hide for the firs time as well.
To reproduce: - Set the DPI scaling to 150% - Add document window at runtime, their text property should be bound to the TextProperty of an underlying custom control. - This works fine with 100% Workaround: Explicitly update the window text prior adding it to the RadDock.
Please refer to the attached sample project. Click the "show" button to open a new MDI child form. Then, press the "close" button. In the Output tab you will notice that the FormClosing/FormClosed events are fired twice. Workaround: use the RadDock's DockWindowClosing and DockWindowClosed events.