共用方式為


Clipboard.HistoryChanged 事件

定義

發生于將新專案新增至剪貼簿記錄時。

// Register
static event_token HistoryChanged(EventHandler<ClipboardHistoryChangedEventArgs> const& handler) const;

// Revoke with event_token
static void HistoryChanged(event_token const* cookie) const;

// Revoke with event_revoker
static Clipboard::HistoryChanged_revoker HistoryChanged(auto_revoke_t, EventHandler<ClipboardHistoryChangedEventArgs> const& handler) const;
public static event System.EventHandler<ClipboardHistoryChangedEventArgs> HistoryChanged;
function onHistoryChanged(eventArgs) { /* Your code */ }
Windows.ApplicationModel.DataTransfer.Clipboard.addEventListener("historychanged", onHistoryChanged);
Windows.ApplicationModel.DataTransfer.Clipboard.removeEventListener("historychanged", onHistoryChanged);
- or -
Windows.ApplicationModel.DataTransfer.Clipboard.onhistorychanged = onHistoryChanged;
Public Shared Custom Event HistoryChanged As EventHandler(Of ClipboardHistoryChangedEventArgs) 

事件類型

Windows 需求

裝置系列
Windows 10, version 1809 (已於 10.0.17763.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v7.0 引進)

適用於