We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Safely Release Overview Diagram Reference in MDI Application

What is the safest way to release the diagram referenced by an overview control when a MDI child form containing a diagram is closed. The overview control is on the MDI Parent.

I have found that after the child form is closed, the Overview still contains an image of the diagram. And, touching the overview control after the child form closes results in an unhandled null reference error.

I have tried to set the overview.diagram = null, as the child form closes, but this still causes an error.



1 Reply

AD Administrator Syncfusion Team November 26, 2007 11:47 AM UTC

Hi Michael,

Thank you for your interest in Syncfusion products.

Safely releasing Overview Diagram Reference in MDI Application

You can safely release the Overview diagram reference in MDI application using the method DetachDiagram of OverView control in FormClosing event. The following code snippet illustrates this.

[C#]

this.overviewControl1.DetachDiagram();
MainForm.DetachModel( ChildForm.Diagram.Model );

Please refer the shipped DiagramBuilder sample that itself is a MDI application that accomplishes the above said feature.

Please let me know if this helps you.

Regards,
Jaya


Loader.
Live Chat Icon For mobile
Up arrow icon