Provides information about a fileremoved event.
Syntax
/* For information about creating or accessing this object, see Remarks. */
Attributes
- VersionAttribute(NTDDI_WIN8)
Members
The FileRemovedEventArgs class has these types of members:
Methods
The FileRemovedEventArgs class inherits methods from the Object class (C#/VB/C++).
Properties
The FileRemovedEventArgs class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the identifier of the file that the user removed from the list of chosen files in the file picker. This identifier was set by the providing app when it added the files to the list of chosen files. |
Remarks
This object is passed to the event handler for fileremoved events.
If your app participates in the File Open Picker contract and a fileremoved event fires, you should respond by updating its file picker app page to reflect the change in the list of chosen files.
Register for this event by adding an event listener to the fileOpenPickerUI and assigning a handler function for the event. You can access information about the event from the fileRemovedEventArgs object that is passed to your event handler.
Examples
The File picker sample demonstrates how to respond to a fileremoved event.
// Event handler function onFileRemovedFromBasket(e) { // Perform tasks when an item is removed from the file picker, like updating buttons or notifying the user // Add any code to be called when an item is removed from the basket by the user WinJS.log && WinJS.log(SdkSample.fileRemoved, "sample", "status"); // Adjust the add/remove buttons based on removal updateSelectionState(e.id, false); }; // Register for the event fileOpenPickerUI.addEventListener("fileremoved", onFileRemovedFromBasket, false);
Both args and e (in C# and JS respectively) contain a FileRemovedEventArgs object.
For JavaScript, SdkSample.fileRemoved is an app variable that contains a string that used to used to notify the user.
For C#, id is an app variable that gets an identifier for the file and UpdateButtonState is one of the app's helper methods.
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012