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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Safely Release Overview Diagram Reference in MDI Application

Thread ID:

Created:

Updated:

Platform:

Replies:

69978 Nov 21,2007 02:35 AM UTC Nov 26,2007 11:47 AM UTC WinForms 1
loading
Tags: Diagram
Michael
Asked On November 21, 2007 02:35 AM UTC

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.



Administrator [Syncfusion]
Replied On 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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;