在Windows Phone 10上通过FileOpenPicker访问相机

3
我正在使用以下代码展示照片库:
```

我正在使用以下代码展示照片库:

```
FileOpenPicker openPicker = new FileOpenPicker();
openPicker.ViewMode = PickerViewMode.Thumbnail;
openPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
openPicker.FileTypeFilter.Add(".jpg");
openPicker.FileTypeFilter.Add(".jpeg");
openPicker.FileTypeFilter.Add(".png");
filePicker.PickSingleFileAndContinue();

在Windows Phone 8.1中,FileOpenPickerApplicationBar中显示相机按钮。

当在Windows Phone 10中使用相同的代码时,确认和取消按钮代替了相机按钮。

如何像8.1那样显示相机按钮?

2个回答

3
点击应用栏中的“选择位置”将提示您使用支持照片的应用程序列表,包括相机。
虽然我认为这比Windows Phone 8.1不太突出(并且本地化很奇怪),但我想这是启动相机的方法。

0

在 Windows 10 Mobile 应用程序栏中无法显示相机按钮。但是,如果您不指定 SuggestedStartLocation,则相机选项将与其他选项(如文件和照片)一起显示在菜单中。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接