gpt4 book ai didi

c# - FileSavePicker 任务未显示在 wp8 c# 的 Window.Storage.Pickers 中

转载 作者:行者123 更新时间:2023-11-30 17:43:47 25 4
gpt4 key购买 nike

我正在尝试使用 FilePicker Task 保存视频文件,但它没有在解决方案中显示 FileSavePicker 任务。下面附上截图

Windows.Storage.Pickers 中只显示 4 个任务

  1. 文件扩展向量
  2. 文件打开选择器
  3. PickerLocationId
  4. 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 应用。

最佳答案

文件选取器在 Windows Phone 8 上不可用。它们是随 Windows Phone 8.1 添加的。

请参阅 FileSavePicker docs 中的版本部分在 MSDN 上:

Minimum supported phone Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

关于c# - FileSavePicker 任务未显示在 wp8 c# 的 Window.Storage.Pickers 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30438738/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com