FileRemovedEventArgs class

Applies to Windows and Windows Phone

Provides information about a fileremoved event.


/* For information about creating or accessing this object, see Remarks. */




The FileRemovedEventArgs class has these types of members:


The FileRemovedEventArgs class inherits methods from the Object class (C#/VB/C++).


The FileRemovedEventArgs class has these properties.

PropertyAccess typeDescription


Read-onlyGets 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.



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.


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(, 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.


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]


Windows::Storage::Pickers::Provider [C++]



See also

fileOpenPickerUI class
fileOpenPickerUI.fileremoved event



© 2014 Microsoft