Used to interact with the file picker if your app provides files with the File Open Picker contract.
The FileOpenPickerUI class has these types of members:
The FileOpenPickerUI class has these events.
|Closing||Fires when the user closes the file picker|
|FileRemoved||Fires when the user removes a file from the list of files that the user has chosen if that file was added by the app that is providing files.|
The FileOpenPickerUI class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.
|AddFile||Adds the specified file to the list of files that the user has chosen.|
|CanAddFile||Indicates whether the specified file can be added to the list of files the user has chosen.|
|ContainsFile||Determines whether the specified file is in the list of files that the user has chosen.|
|RemoveFile||Removes the specified file from the list of files the user has chosen.|
The FileOpenPickerUI class has these properties.
|Read-only||Gets a list of file types (extensions) that the user can choose.|
|Read-only||Gets an enumeration value that indicates whether the file picker currently limits selection to single files, or if multiple files can be selected.|
|Read-only||Gets an identifier for the current context of the file picker.|
|Read/write||Gets or sets a title to display in the file picker UI that identifies the location that the file picker is displaying to the user.|
If your app participates in the File Open Picker contract, you can retrieve this object using a FileOpenPickerUI property while you handle a fileOpenPicker activated event.
Use one of the following properties to access a FileOpenPickerUI:
Learn about creating a good experience for users when they access your files through the file picker by reading the UX guidelines for providing files in Guidelines and checklist for file picker contracts.
eventObject contains a webUIFileOpenPickerActivatedEventArgs object.
args contains a FileOpenPickerActivatedEventArgs object. Additionally, the
OnFileOpenPickerActivated is in the App.xaml.cs file and the
Activate method is in the FileOpenPickerPage.xaml.cs file of the File picker sample.
Minimum supported client
|Windows 8 [Windows Store apps only]|
Minimum supported server
|Windows Server 2012 [Windows Store apps only]|
Minimum supported phone
|Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]|
- Guidelines and checklist for file pickers
- Windows.ApplicationModel.Activation.activationKind enumeration
- Windows.UI.WebUI.webUIFileOpenPickerActivatedEventArgs class
- C#/C++/VB reference
- Windows.ApplicationModel.Activation.ActivationKind enumeration
- Windows.ApplicationModel.Activation.FileOpenPickerActivatedEventArgs class