Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform-independent Bitmaps #2

Merged
merged 9 commits into from
Jun 30, 2013
Merged

Platform-independent Bitmaps #2

merged 9 commits into from
Jun 30, 2013

Conversation

anaisbetts
Copy link
Member

This PR makes it so that ViewModels can handle bitmap loading / caching.

Here's the idea:

//
// This is in the ViewModel - we can share this on every platform without having
// to put our image loading code in the view
//

LoadedImage = await BitmapLoader.Current.Load(File.OpenRead(CurrentFilePath)));

//
// Meanwhile in another part of town, the View....
//
LoadImage.ImageSource = ViewModel.LoadedImage.ToNative();

TODO:

  • Finish up Android / iOS
  • Implement it in WinRT
  • Implement it in WPF
  • Implement it in WP8
  • Figure out how to register the native loaders with the platform-independent bit

Yes, Microsoft invented three separate ways to load bitmaps. No, I'm serious.

anaisbetts pushed a commit that referenced this pull request Jun 30, 2013
Platform-independent Bitmaps
@anaisbetts anaisbetts merged commit c6e08b4 into master Jun 30, 2013
@anaisbetts anaisbetts deleted the bitmaps branch December 19, 2013 01:04
@lock lock bot locked and limited conversation to collaborators Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant