Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Platform-independent Bitmaps#2

Merged
anaisbetts merged 9 commits intomasterfrom
bitmaps
Jun 30, 2013
Merged

Platform-independent Bitmaps#2
anaisbetts merged 9 commits intomasterfrom
bitmaps

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