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) 

事件类型

属性

注解

如果你的应用参与文件打开选取器合约,并且你的应用使用文件选取器中托管的应用页面直观地指示用户选择的项目,则你应该响应此事件。 当 FileRemoved 事件触发时,应更新应用的文件选取器页面以反映更改。 在 FileRemovedEventArgs 中详细了解如何响应此事件。

适用于

另请参阅