【发布时间】:2015-05-25 12:46:55
【问题描述】:
我正在尝试使用 FilePicker 任务保存视频文件,但它没有在解决方案中显示 FileSavePicker 任务。下面附上截图
Windows.Storage.Pickers 中只显示 4 个任务
- 文件扩展向量
- FileOpenPicker
- PickerLocationId
- PickerViewMode
这是我正在使用的代码
async void TrimVideoFile()
{
Windows.Storage.StorageFile source;
Windows.Storage.StorageFile destination;
var openPicker = new Windows.Storage.Pickers.FileOpenPicker();
openPicker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.VideosLibrary;
openPicker.FileTypeFilter.Add(".wmv");
openPicker.FileTypeFilter.Add(".mp4");
source = await openPicker.PickSingleFileAsync();
var savePicker = new Windows.Storage.Pickers.FileSavePicker()
savePicker.SuggestedStartLocation =
Windows.Storage.Pickers.PickerLocationId.VideosLibrary;
savePicker.DefaultFileExtension = ".mp4";
savePicker.SuggestedFileName = "New Video";
savePicker.FileTypeChoices.Add("MPEG4", new string[] { ".mp4" });
destination = await savePicker.PickSaveFileAsync();
// Method to perform the transcoding.
TrimFile(source, destination);
}
它只显示 4 个任务。如何使用 FileSavePicker 任务。我正在使用 Visual Studio 2012,我的目标应用是 Windows Phone 8.0 应用。
【问题讨论】:
标签: c# windows-phone-8 filesavepicker