In Development
Last Updated: 16 Jan 2020 14:59 by ADMIN
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);