從程式碼中的資產載入影象

 ImageSource result = new BitmapImage(new Uri("ms-appx:///Assets/Windows_10_Hero.png"));

使用 result 來設定 Image 控制元件的 Source 屬性,無論是 Binding 還是程式碼隱藏