C# 在WinRT中访问图像文件并将其绑定到图像

C# 在WinRT中访问图像文件并将其绑定到图像,c#,xaml,windows-runtime,winrt-xaml,C#,Xaml,Windows Runtime,Winrt Xaml,我想知道如何设置此代码创建的图像的ImageSource: var createfolder = await picturesFolder.CreateFolderAsync("cakeimages", CreationCollisionOption.ReplaceExisting); await picturesFolder.GetFolderAsync("cakeimages"); var outputfile = await file.CopyAsync(picturesFolder, n

我想知道如何设置此代码创建的图像的ImageSource:

var createfolder = await picturesFolder.CreateFolderAsync("cakeimages", CreationCollisionOption.ReplaceExisting);
await picturesFolder.GetFolderAsync("cakeimages");
var outputfile = await file.CopyAsync(picturesFolder, newfilename + i+ file.FileType, NameCollisionOption.ReplaceExisting);
我将一个图像文件复制到本地文件夹,并根据我的代码将其重命名。如何将该图像的源绑定到该图像?

通过文件的URI将图像的源设置为新的ImageSource或BitmapImage。