共用方式為


FileOpenPickerUI.FileRemoved 事件

定義

注意

FileRemoved 事件已被取代,不應使用。

當使用者從使用者已選擇的檔案清單中移除檔案時,如果提供檔案的應用程式已新增該檔案,就會引發。

// Register
event_token FileRemoved(TypedEventHandler<FileOpenPickerUI, FileRemovedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
FileOpenPickerUI::FileRemoved_revoker FileRemoved(auto_revoke_t, TypedEventHandler<FileOpenPickerUI, FileRemovedEventArgs const&> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("Since Windows 10, only apps can remove files, not end users so the FileRemoved event will not be raised.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("Since Windows 10, only apps can remove files, not end users so the FileRemoved event will not be raised.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")]
// Register
event_token FileRemoved(TypedEventHandler<FileOpenPickerUI, FileRemovedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
FileOpenPickerUI::FileRemoved_revoker FileRemoved(auto_revoke_t, TypedEventHandler<FileOpenPickerUI, FileRemovedEventArgs const&> const& handler) const;
public event TypedEventHandler<FileOpenPickerUI,FileRemovedEventArgs> FileRemoved;
[add: Windows.Foundation.Metadata.Deprecated("Since Windows 10, only apps can remove files, not end users so the FileRemoved event will not be raised.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("Since Windows 10, only apps can remove files, not end users so the FileRemoved event will not be raised.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")]
public event TypedEventHandler<FileOpenPickerUI,FileRemovedEventArgs> FileRemoved;
function onFileRemoved(eventArgs) { /* Your code */ }
fileOpenPickerUI.addEventListener("fileremoved", onFileRemoved);
fileOpenPickerUI.removeEventListener("fileremoved", onFileRemoved);
- or -
fileOpenPickerUI.onfileremoved = onFileRemoved;
Public Custom Event FileRemoved As TypedEventHandler(Of FileOpenPickerUI, FileRemovedEventArgs) 

事件類型

屬性

備註

如果您的 app 參與檔案開啟選擇器合約,而您的應用程式會使用裝載于檔案選擇器中的應用程式頁面,以視覺化方式指出使用者選取的專案,您應該回應此事件。 引發 FileRemoved 事件時,您應該更新應用程式的檔案選擇器頁面以反映變更。 深入瞭解在 FileRemovedEventArgs中回應此事件。

適用於

另請參閱