To reproduce:
1. Create a floating window
2. Try to drop another window into the floating window
3. The window is successfully docked into the floating window, but DockStateChanged event does not fire.
Hello,
I have downloaded the latest winform version today and launched my application.
I experienced an immediate crash while replacing a document container by a split container.
You can see the small piece of code and the insttruction which is causing the crash ....
Obviously it was working properly before upgrading ...
Can you help? I am now just stuck so a fix or a workaround would be useful...
Thanks,
Olivier D.
if (ctrlOutput == null)
{
Telerik.WinControls.UI.RadSplitContainer mainSplitContainer = null;
ctrlOutput = new ToolWindowOutput(sbOutput);
var Output = new Telerik.WinControls.UI.Docking.ToolWindow();
Output.Text = "Output";
Output.Controls.Add(ctrlOutput);
var toolTabStrip = new Telerik.WinControls.UI.Docking.ToolTabStrip();
toolTabStrip.Controls.Add(Output);
if (this.documentContainer1.Parent == this.radDock1)
{
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
this.radDock1.Controls.Remove(this.documentContainer1); <<<< CRASH HERE
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// need to remplace document container by a split container
mainSplitContainer = new Telerik.WinControls.UI.RadSplitContainer();
mainSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
mainSplitContainer.Controls.Add(this.documentContainer1);
this.radDock1.Controls.Add(mainSplitContainer);
}
else
{
mainSplitContainer = (Telerik.WinControls.UI.RadSplitContainer)this.documentContainer1.Parent;
}
mainSplitContainer.Controls.Add(toolTabStrip);
I was already using telerik 2015 version. that was everything ok. Until I decided to upgrade to 2019 version.
I noticed that the new version is having a problem.
When RadDock Using In RightToLeft mode DocumentTabStrip Window apperance corrupted.
I uploaded sample projects for guidance.
Please help me.
My problem is acute.
Hello,
when drag and dropping documents in Dock layout, after some operations application crashes. Crash can be reproduce even in Dock sample from Telerik (Visual Studio Demo). Drag and drop documents into middle area, let them create more pages in one tab and then drag and drop pages to change their order. After several order changes application crashes to windows.
If you apply one theme to the entire application and want to apply another theme for RadDock as it is demonstrated in this help article, the ThemeName property of RadDock is not respected:
public RadForm1()
{
InitializeComponent();
radDock1.ElementTree.EnableApplicationThemeName = false;
radDock1.ThemeName = "FluentDark";
ThemeResolutionService.ApplicationThemeName = "Windows7";
}
Please run the attached sample project with the latest version. You will notice that the maximized floating window is not loaded properly. This used to work in versions prior to R1 2019.
Workaround: remove "WindowState=Maximized" from the XML.
1. Add 4 ToolWindows - left, top, right, bottom.
2. Add one DocumentWindow at the center.
3. In the Load event set the MainDocumentContainerVisible property to false.
Please refer to the attached sample gif files. Even though the document container is not shown, the docking guides for the tabbed document are visible.
To reproduce: See attached video. Workaround: public Form1() { RadDockEvents.TabStripItemCreating += RadDockEvents_TabStripItemCreating; InitializeComponent(); radDock1.AutoHideAnimation = Telerik.WinControls.UI.Docking.AutoHideAnimateMode.None; } void RadDockEvents_TabStripItemCreating(object sender, TabStripItemCreatingEventArgs args) { if (args.AutoHide) { var currentScale = args.TabItem.DpiScaleFactor; Screen showScreen = Screen.FromControl(this); SizeF scale = NativeMethods.GetMonitorDpi(showScreen, NativeMethods.DpiType.Effective); if (scale != currentScale) { var font = args.TabItem.Font; var newFont = new Font(font.Name, font.Size * scale.Width, font.Style); args.TabItem.Font = newFont; } } } protected override void OnClosed(EventArgs e) { RadDockEvents.TabStripItemCreating -= RadDockEvents_TabStripItemCreating; base.OnClosed(e); }
How to reproduce: add a textbox to to a document window of a RadDock in the designer of Visual Studio and set its Anchor property to Top | Left | Right Workaround: set the anchors at run-time after loading the form
To reproduce: run the attached sample project. Click the Close button and then the Show button. You will notice that the list view is no longer available. Workaround: instead of using MDI, set the hostWindow.DockState = DockState.TabbedDocument; before showing the form.
Please use the project attached. 1.Run the application with multi-monitor configuration. 2.Undock toolWindow1 from RadForm1 and maximize it to the different window. 3.Close the application (the layout will be saved). 4.Run the application again. Workaround: handle the FloatingWindowCreated event and set FormWindowState.Maximized for the floating window. protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.radDock1.FloatingWindowCreated+=radDock1_FloatingWindowCreated; if (File.Exists(FileName)) radDock1.LoadFromXml(FileName); } private void radDock1_FloatingWindowCreated(object sender, Telerik.WinControls.UI.Docking.FloatingWindowEventArgs e) { e.Window.WindowState = FormWindowState.Maximized; }
To reproduce: run the application. On the first DocumentWindow there is a UserControl with a wizard. Pressing the Tab key will navigate the command buttons. On the second DocumentWindow there is a similar wizard which is NOT hosted in a UserControl. Workaround: Currently, you can override the ProcessDialogKey method of RadWizard and handle the Tab key where you can perform the desired logic, e.g. select a specific control: public class MyWizard : RadWizard { protected override bool ProcessDialogKey(Keys keyData) { if (keyData == Keys.Tab) { WizardPage page = this.SelectedPage; page.ContentArea.Controls[0].Focus(); return false; } return base.ProcessDialogKey(keyData); } }
How to reproduce: Check the attached project and video Workaround: Set the MaximumSize property of the control while designing the form and remove it when the application starts
To reproduce: please run the attached sample project and follow the steps in the gif file. After some further testing you will notice that the tab items are re-positioned incorrectly when you click a certain tab. It jumps to another location. Workaround: set the MultiLineItemFitMode property to None and specify the DocumentWindow.TabStripItem.Row property in order to arrange the tabs as you wish.
How to reproduce: check the attached project and video Workaround: public partial class RadForm1 : Telerik.WinControls.UI.RadForm { public RadForm1() { InitializeComponent(); radDock1.FloatingWindowCreated += RadDock1_FloatingWindowCreated; } private void RadDock1_FloatingWindowCreated(object sender, Telerik.WinControls.UI.Docking.FloatingWindowEventArgs e) { e.Window = new MyWindow(this.radDock1); } } public class MyWindow : FloatingWindow { SizeF oldDpi = new SizeF(1, 1); public MyWindow(RadDock dockManager) : base (dockManager) { } protected override void HandleDpiChanged() { base.HandleDpiChanged(); SizeF descale = new SizeF(1f / this.FormElement.DpiScaleFactor.Width, 1f / this.FormElement.DpiScaleFactor.Height); this.Scale(descale); var dpi = NativeMethods.GetMonitorDpi(Screen.FromRectangle(this.Bounds), NativeMethods.DpiType.Effective); if (oldDpi != dpi) { SizeF sz = new SizeF(dpi.Width / oldDpi.Width, dpi.Height / oldDpi.Height); this.Scale(dpi); } oldDpi = dpi; } }
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.
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
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; } }