从代码中的资产加载图像

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

使用 result 来设置 Image 控件的 Source 属性,无论是 Binding 还是代码隐藏