0

In WinForms, I can dispose of an image like this

pictureBox1.Image.Dispose();

I know that Picturebox.Image control in WinForms is Image.Source in WPF. But there is no dispose() method in Image.Source.

I also see this link.

But why is it so complicated compared to WinForms?

Is there any equivalent method in WPF?

Dale K
  • 25,246
  • 15
  • 42
  • 71
GrayLobo
  • 1
  • 1
  • See here: [WPF Image control not disposing source](https://stackoverflow.com/a/49144817/7444103) – Jimi May 27 '20 at 02:09
  • Why do you want to dispose Image.Source directly? What do you want to achieve? – Louis Go May 27 '20 at 02:10
  • Does https://stackoverflow.com/a/26532667/34092 help? – mjwills Jul 30 '20 at 04:24
  • please refer to this link It can be done with MVVM. WPF is using a different approach for desktop development. Most of WinForms development method didn't apply to the WPF! – KLMa Jul 30 '20 at 04:18

0 Answers0