TextBlock.ContextMenuOpening 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当系统处理显示上下文菜单的交互时发生。
public:
virtual event ContextMenuOpeningEventHandler ^ ContextMenuOpening;
// Register
event_token ContextMenuOpening(ContextMenuOpeningEventHandler const& handler) const;
// Revoke with event_token
void ContextMenuOpening(event_token const* cookie) const;
// Revoke with event_revoker
TextBlock::ContextMenuOpening_revoker ContextMenuOpening(auto_revoke_t, ContextMenuOpeningEventHandler const& handler) const;
public event ContextMenuOpeningEventHandler ContextMenuOpening;
function onContextMenuOpening(eventArgs) { /* Your code */ }
textBlock.addEventListener("contextmenuopening", onContextMenuOpening);
textBlock.removeEventListener("contextmenuopening", onContextMenuOpening);
- or -
textBlock.oncontextmenuopening = onContextMenuOpening;
Public Custom Event ContextMenuOpening As ContextMenuOpeningEventHandler
<TextBlock ContextMenuOpening="eventhandler" />