FileOpenPickerUI.Closing Event

Definition

Fires when the user closes the file picker.

// Register
event_token Closing(TypedEventHandler<FileOpenPickerUI, PickerClosingEventArgs const&> const& handler) const;

// Revoke with event_token
void Closing(event_token const* cookie) const;

// Revoke with event_revoker
FileOpenPickerUI::Closing_revoker Closing(auto_revoke_t, TypedEventHandler<FileOpenPickerUI, PickerClosingEventArgs const&> const& handler) const;
public event TypedEventHandler<FileOpenPickerUI,PickerClosingEventArgs> Closing;
function onClosing(eventArgs) { /* Your code */ }
fileOpenPickerUI.addEventListener("closing", onClosing);
fileOpenPickerUI.removeEventListener("closing", onClosing);
- or -
fileOpenPickerUI.onclosing = onClosing;
Public Custom Event Closing As TypedEventHandler(Of FileOpenPickerUI, PickerClosingEventArgs) 

Event Type

Remarks

As a provider of files, you can register for this event so that your app can execute cleanup tasks before it is closed. For example, if the user cancels the file picker, you could respond by cleaning up temporary files that were added to the file picker when the user chose them.

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 PickerClosingEventArgs object that is passed to your event handler.

Applies to