Bitmap image

This article explain how to set image to the Image control of XAML. The Source property of the Image control accept the BitmapImage type data, so if it needs set from view model, data context of the page have to defined the BitmapImage type property and set instance of the BitmapImage object on it.

>>Sample solution for Visual Studio 2017

>>Visual Studio 2017 community is free

・View model

The BitmapImage object of the BitmapImage type property named PhotoImage is instanced at constructor of the ViewModel. The source property of the BitmapImage create using a name of identity providers, so the Assets folder needs include images of same name which is created.

・xaml

・View model

About takao