Completed
Last Updated: 14 Sep 2020 12:47 by ADMIN
Release R3 2020

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
  HResult=0x80004005
  Message=Fout bij het maken van de vensterkoppeling. (Translation: Error making window link.)
  Source=System.Windows.Forms
  StackTrace:
   at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
   at System.Windows.Forms.Timer.TimerNativeWindow.EnsureHandle()
   at System.Windows.Forms.Timer.TimerNativeWindow.StartTimer(Int32 interval)
   at System.Windows.Forms.Timer.set_Enabled(Boolean value)
   at System.Windows.Forms.Timer.Start()
   at Telerik.WinControls.UI.RadFormControlBase.ScaleControl(SizeF factor, BoundsSpecified specified)
   at System.Windows.Forms.Control.ScaleControl(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
   at System.Windows.Forms.Control.Scale(SizeF factor)
   at Telerik.WinControls.UI.RadFormControlBase.HandleDpiChanged()
   at Telerik.WinControls.UI.RadFormControlBase.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

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

 

Unplanned
Last Updated: 04 Aug 2020 10:46 by ADMIN
Please run the sample project in an environment with left monitor at 150% DPI scaling and right monitor at 100%. You will notice that the ToolWindow remains with fixed width.
Unplanned
Last Updated: 28 Jul 2020 12:32 by ADMIN

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.

Completed
Last Updated: 01 May 2020 08:33 by ADMIN
Release Q1 2015
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 2
Category: Dock
Type: Bug Report
0
To reproduce:
1.Add a RadDock with two ToolWindows, docked in a shared TabStrip.
2.Change the dock state of the first ToolWindow to "Floating".
3.Change the dock state of the second ToolWindow to "Autohide".
4.Save the layout.
5.Change the layout.
6.Load the layout.

As a result both of the ToolWindow are autohidden.
Completed
Last Updated: 23 Jan 2020 11:53 by ADMIN
Release R1 2020 SP1 (LIB 2020_1_127)

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.

Completed
Last Updated: 20 Jan 2020 12:06 by ADMIN
Release R1 2020 SP1 (LIB 2020_1_120)
Created by: Olivier
Comments: 1
Category: Dock
Type: Bug Report
0

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);
            

Completed
Last Updated: 17 Dec 2019 15:36 by ADMIN
Release R1 2020

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.

 

 

Completed
Last Updated: 07 Nov 2019 14:11 by ADMIN
Release R1 2020 (LIB 2019.3.1111)

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"; 
        }

 

Completed
Last Updated: 07 Nov 2019 14:09 by ADMIN
Release R1 2020 (LIB 2019.3.1111)

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.

Completed
Last Updated: 04 Oct 2019 08:23 by ADMIN
Release R1 2019
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;
    }
Completed
Last Updated: 04 Jun 2019 11:04 by ADMIN
Use the attached project to reproduce.

Workaround:
private void RadForm1_SizeChanged(object sender, EventArgs e)
{
    toolWindow1.EnsureVisible();
}
Completed
Last Updated: 16 May 2019 08:57 by ADMIN
Release R1 2019
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.
Completed
Last Updated: 02 May 2019 16:07 by ADMIN
Release R2 2019

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. 

Completed
Last Updated: 30 Apr 2019 07:59 by ADMIN
Release R2 2019
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;
    }
}
Completed
Last Updated: 11 Apr 2019 14:50 by Dimitar
Release R2 2019 (LIB 2019.1.415)
Use attached to reproduce.

Tested on Windows 10 (1607 and 1703)

Workaround:

RadControl.EnableDpiScaling = False

Unplanned
Last Updated: 20 Mar 2019 09:44 by ADMIN
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.
Completed
Last Updated: 23 Nov 2018 12:38 by Dimitar
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
Completed
Last Updated: 10 Oct 2018 09:23 by Moshe
Having a 
RadDock control put in a simple RadForm, if in execution time we add a ToolWindow control
 to this RadDock and, in that very moment that the tool window is being painted,
 we alternate between two or more applications using "Alt+Tab" keys repeteadly 
and in a fast way, my application crashes generating an "NullReferenceException". 
The original exception trace is as follows:
 Tipo="NullReferenceException" Mensaje="Referencia a objeto no establecida como instancia de un objeto.
" Source="Telerik.WinControls.RadDock" Trace=" 
en Telerik.WinControls.UI.Docking.RadDockCommandManager.CanProcessMessage(Message msg)
&#xD;&#xA; en Telerik.WinControls.UI.Docking.RadDockCommandManager.Telerik.WinControls.IMessageListener.PreviewMessage(Message&amp; msg)&#xD;&#xA; 
en Telerik.WinControls.RadMessageFilter.NotifyGetMessageEvent(Message&amp; msg)&#xD;&#xA; en Telerik.WinControls.RadMessageFilter.GetMessageHookProc(Int32 code, IntPtr wParam, IntPtr lParam)&#xD;&#xA; en System.Windows.Forms.UnsafeNativeMethods.GetMessageW
(MSG&amp; msg, HandleRef hWnd, Int32 uMsgFilterMin, Int32 uMsgFilterMax)&#xD;&#xA; en System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop
(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)&#xD;&#xA; en System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)&#xD;&#xA; 
en System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)&#xD;&#xA; en System.Windows.Forms.Application.Run(Form mainForm)&#xD;&#xA;
Declined
Last Updated: 10 Oct 2018 09:02 by ADMIN
To reproduce:
- Set the font of the tool window:
  ((ToolTabStrip)this.toolWindow1.TabStrip).CaptionElement.Font = font1;
- Make the tool window floating and then dock it again.
- The font is not preserved.

Workaround:
Set the font in the DockStateChanged event. 
Unplanned
Last Updated: 24 Aug 2018 12:59 by ADMIN
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);
            }
        }