When closing the MDI child, its FormClosing event is called twice. This is not observed if we close its HostWindow first.
this.radDock1.DockTabStripNeeded += this.RadDock1_DockTabStripNeeded;
private void RadDock1_DockTabStripNeeded(object sender, DockTabStripNeededEventArgs e)
{
if (e.DockType == DockType.ToolWindow)
{
e.Strip = new MyToolTabStrip();
}
else
{
e.Strip = new MyDocumentTabStrip();
}
}
public class MyToolTabStrip : ToolTabStrip
{
protected override bool ScaleChildren => false;
}
public class MyDocumentTabStrip : DocumentTabStrip
{
protected override bool ScaleChildren => false;
}
Our application embed a RadDock element.Unfortunately, in a non-systematic way, our application crash with this stack trace:
Our application is a 64bit application (we migrated it to NET6 using Telerik 2022.2.510.60). As I told unfortunately in this case I'm not able to isolate the case in a simple project (as I'm used to to).
It would be useful by your side, however, make a check to the last trace line of the log I've gave to you:
at Telerik.WinControls.UI.ThemedFormBehavior.OnWMNCHitTest(Message& m)
If I decompile your code I find this:
Use the following code snippet:
ToolTabStrip tabStrip = this.toolWindow1.TabStrip as ToolTabStrip;
this.toolWindow1.Text = "<html><span style=\"font-family:Segoe UI;font-size:8.25;\"><b>Hello</b></span><span" +
" style=\"font-family:Segoe UI;font-size:8.25;\">Woooooooooooooooooorld</span></html>";
TextPrimitive text = tabStrip.CaptionElement.FindDescendant<TextPrimitive>();
text.ClipDrawing = true;
text.StretchHorizontally = false;
text.DisableHTMLRendering = false;
text.AutoEllipsis = false;
Hi,
I have C# Winforms application targeting .Net 5.
I am trying to use the Raddock with the Visual Studio 2012 dark theme, adding to a radribbonform
There are several tool windows that i have tabbed using the Advance layout designer. When i try to select a tab in the main Visual studio designer i am unable to change it from the one i selected in the Advanced layout designer.
I am also unable to resize the windows using the split container while in standard design view.
I have attached a word document to try and explain.
My VS version is:
Microsoft Visual Studio Professional 2019
Version 16.9.1
thanks
Mark.
Hi,
I am trying to make a Winforms app high dpi aware. All seems fine except when using a toolwindow on a raddock. Is there some special to setup when I want a Raddock to also autoscale?
I created a GIF to example the behaviour. The left side is at 15% and the right side just at 100%. I move the form from right to left and back. As you can see most controls get resized, except for the size of the toolwindows in the raddock.
The raddock is the only dock on the form and is set to dock in parrent.
At the end of the gif you can see some behaviour when I place the form over both screens. Then the applications breaks. I get this error:
System.ComponentModel.Win32Exception
Maybe this is normal behaviour, but I still want to mention it, because it is possible that in an work environment, someone might to this from time to time. Maybe not on purpose, but still.
Regariding the high DPI, am I doing something wrong?
Thx.
Henk
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.