I use the prism.Unity (WPF).
I show a image in ViewA, And I want to Delete the image in ViewB
When I jump from ViewA to ViewB and delete this image
The Vistual Studio tip: The process cannot access the file '...\bin\Debug\netcoreapp3.1\Images\1.png' because it is being used by another process.
In other words, the image(Xaml) data of viewA is not been destroyed, What should I do?
// App.Xaml.cs
containerRegistry.RegisterForNavigation<ViweA>();
containerRegistry.RegisterForNavigation<ViweB>();
// ViewAViewModel.cs
_regionManager.RequestNavigate("ContentRegion", "ViweB");