Thursday, May 09, 2013

N=14 - Adding the PictureChooser and File plugins to CollectABull - N+1 Days of MvvmCross

Continuing on the Collect-A-Bull sample, we add:

  • Image taking using the MvxPictureChooserTask
  • File read/write using the MvxFileStore
  • On-View image display using some value converters






The source code from the end of this step is at https://github.com/slodge/NPlus1DaysOfMvvmCross/tree/master/N-14-CollectABull-Part3



I may have been a bit confusing when I talked about the value converters - sorry about this. The basic concept that I was trying to explain was:

  • the WindowsPhone Image control directly supports BitmapImage objects for its Source property
  • the WindowsPhone runtime knows how to load http:// urls and embedded app content/resource files into BitmapImage objects
  • but it does not know what to do with either byte[] arrays or with isolated storage file paths
  • to work around this problem, we provide two converters to do the work

 

Previously in N+1:



No comments:

Post a Comment