Should the View Model expose the loaded bitmap image (BitmapImage class) or only should provide filenames and let the WPF controls load the image or load an audio file for instance.
What is correct from the View Model's role in the MVVM design pattern.
The reason I am asking this is that if WPF controls are allowed to load images from local storage, it will be difficult for the application to monitor which files are in use.
Edit: The problem arises when the application manages it's file resources(WinRT or WindowsPhone apps). The application cannot manage the file resources when WPF controls load the files and application will become indirectly dependent on the life cycle of WPF controls since the files cannot be deleted or modified till the WPF control releases it.
Also frameworks like caliburn Micro do not have the concept of code behind. So how should these cases be dealt with? Thanks