簡體   English   中英

Windows Phone 8.1應用程序選擇器

[英]Windows Phone 8.1 Application Picker

如何通過代碼在WIndows Phone 8.1中顯示文件的應用程序選擇器? 目前,我正在使用DisplayApplicationPicker = true但無法正常工作。 有人可以給我示例代碼嗎?

您幾乎在哪里:

// Set the option to show the picker
      var options = new Windows.System.LauncherOptions();
      options.DisplayApplicationPicker = true;

來源: https : //msdn.microsoft.com/zh-cn/library/windows/apps/windows.system.launcheroptions.displayapplicationpicker.aspx

FileOpenPicker filePicker = new FileOpenPicker();
filePicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
filePicker.ViewMode = PickerViewMode.Thumbnail;

// Filter to include a sample subset of file types
filePicker.FileTypeFilter.Clear();
filePicker.FileTypeFilter.Add(".bmp");
filePicker.FileTypeFilter.Add(".png");
filePicker.FileTypeFilter.Add(".jpeg");
filePicker.FileTypeFilter.Add(".jpg");

filePicker.PickSingleFileAndContinue();

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM