title: MVVM: Image Bind Source from FileOpenPicker
body: <p>I added the OnActivated() into app.xaml.cs it is work correctly:</p>
  
  <pre><code>protected async override void OnActivated(IActivatedEventArgs args)
          {
              var continuationEventArgs = args as IContinuationActivatedEventArgs;
              if (continuationEventArgs != null)
              {
                  switch (continuationEventArgs.Kind)
                  {
                      case ActivationKind.PickFileContinuation:
                          FileOpenPickerContinuationEventArgs arguments = continuationEventArgs as FileOpenPickerContinuationEventArgs;
                          string passedData = (string)arguments.ContinuationData["keyParameter"];
                          StorageFile file = arguments.Files.FirstOrDefault(); // your picked file
                          addNewPlaceViewModel.OnFilesPicked(file);
                          // do what you want
                          break;
                  }
              }
          }
  </code></pre>
  
  <p>I hooked already FileOpenPicker into MVVM project correctly. This is my code:</p>
  
  <pre><code>private static readonly IEnumerable&lt;string&gt; SupportedImageFileTypes = new List&lt;string&gt; { ".jpeg", ".jpg", ".png" };
      public AddNewPlaceViewModel(INavigationService navigationService)
      {
          this.navigationService = navigationService;
      }
      private async void OnFilesPicked(IStorageFile file)
      {
  
              if (file != null)
              {
                  var bitmapImage = new BitmapImage();
                  await bitmapImage.SetSourceAsync(await file.OpenReadAsync());
                  Picture = bitmapImage;
                  //IN debugger in picture I have sht but in xaml i cannot show this.
              }
          }
      }
      private static void TriggerPicker(IEnumerable&lt;string&gt; fileTypeFilers, bool shouldPickMultiple = false)
      {
          var fop = new FileOpenPicker();
          foreach (var fileType in fileTypeFilers)
          {
              fop.FileTypeFilter.Add(fileType);
          }
          if (shouldPickMultiple)
          {
              fop.PickMultipleFilesAndContinue();
          }
          else
          {
              fop.PickSingleFileAndContinue();
          }
      }
  </code></pre>
  
  <p>This is situation after <code>Picture = bitmapImage;</code><img src="https://i.stack.imgur.com/bSMiy.png" alt="enter image description here">
  I have also set up Binding and ICommand: </p>
  
  <pre><code>public ICommand UpdatePictureCommand
          {
              get { return new RelayCommand(o =&gt; TriggerPicker(SupportedImageFileTypes)); }
          }
  private ImageSource _Picture;
          public ImageSource Picture
          {
              get
              {
                  return _Picture;
              }
              set
              {
                  _Picture = value;
                  OnPropertyChanged("Picture");
              }
          }
  </code></pre>
  
  <p>And this is my XAML in pivot item(button and Image) when I want to show photo which I have taken.</p>
  
  <pre><code>&lt;Button Grid.Row ="4" 
                      Content="Dodaj zdjęcie" 
                      HorizontalAlignment="Center"
                      Command="{Binding UpdatePictureCommand}"/&gt;
  &lt;Image Grid.Row="6"
                  Width="192" 
                  Height="192" 
                  Source="{Binding Picture, Mode=TwoWay}"
                  /&gt;
  </code></pre>
  
  <p>A file open picker is working correctly(I can choose or take a photo) but after that I cannot see choosed/taked photo in my XAML. What is going wrong with that code?  </p>