This is a migrated thread and some comments may be shown as answers.

How to release an image which was displayed in an image column?

4 Answers 14 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 31 Jul 2014, 03:50 PM
I have a window with a gridview control with an image column. The image column displays PNG files on my local disk.
Once I'm done with this dialog (after ShowDialog()) I need to remove the images again from disk.
Unfortunately Windows tells me that the images are still in use by my process although the dialog has been closed successfully (my application still runs of course).

What do I need to do to be able to remove the PNG files after the dialog has been closed?
There is no dispose method for WPF windows. What cleanup do I need to do in the closed event?

Thanks for your help.

Markus

4 Answers, 1 is accepted

Sort by
0
Markus
Top achievements
Rank 1
answered on 04 Aug 2014, 04:14 PM
Any thoughts anybody?

I really need to rename the image file once I'm done with the dialog, but the images are still locked by my process.

Thanks,
Markus
0
Yoan
Telerik team
answered on 04 Aug 2014, 04:29 PM
Hi Markus,

I believe that you will find the How to force Image control to close the file that it opens in wpf stackoverflow's article useful.

Please let me know how it works for you.

Regards,
Yoan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Markus
Top achievements
Rank 1
answered on 06 Aug 2014, 06:29 AM
Hi Yoan,

thanks a lot for your hint. That was exactly what I was missing. Now it works as needed.

Best regards,
Markus
0
Yoan
Telerik team
answered on 06 Aug 2014, 12:40 PM
Hi Markus,

I am glad to hear this. Don't hesitate to contact us if you have other questions.

Regards,
Yoan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Markus
Top achievements
Rank 1
Answers by
Markus
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or