The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi!
I''m using Syncfusion version 2.1.0.9.
I get a NullReference Exception when I close my sample app.
Here are some sample code:
dockingManager1.DockControl(new TreeView(), this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 150);
dockingManager1.DockControl(new TreeView(), this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 150);
dockingManager1.DockControl(new TreeView(), this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 150);
If I close the application before focusing on any of the controls I get an exception. But if I select one of the controls before closing the app it works.
If I put all three controls like tabs in one window I don''t get the error either.
Thanks, Urban.
ADAdministrator Syncfusion Team September 16, 2004 10:15 AM UTC
Hi Urban,
This issue was recently reported by our customers who had installed the service pack1 for the .Net framework 1.1 and we are already working on fixing this issue.
For now could you please use the following workaround :
Handle the host form''s Closing event and explicitly dispose off all the controls associated with the DockingManager and the DockingManager itself.
private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
IEnumerator ienum = this.dockingManager1.Controls;
ArrayList dockedctrls = new ArrayList();
while(ienum.MoveNext())
dockedctrls.Add(ienum.Current);
foreach(Control ctrl in dockedctrls)
{
this .dockingManager1.SetEnableDocking(ctrl, false);
ctrl.Dispose();
}
this.dockingManager1.Dispose();
}
Please let me know how it goes. Thanks.
Best regards,
Stephen.
>Hi!
>
>I''m using Syncfusion version 2.1.0.9.
>
>I get a NullReference Exception when I close my sample app.
>
>Here are some sample code:
>
>dockingManager1.DockControl(new TreeView(), this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 150);
>
>dockingManager1.DockControl(new TreeView(), this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 150);
>
>dockingManager1.DockControl(new TreeView(), this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 150);
>
>If I close the application before focusing on any of the controls I get an exception. But if I select one of the controls before closing the app it works.
>
>If I put all three controls like tabs in one window I don''t get the error either.
>
>Thanks, Urban.