CoreWindow.SizeChanged 事件

定义

在窗口大小更改时发生。

// Register
event_token SizeChanged(TypedEventHandler<CoreWindow, WindowSizeChangedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
CoreWindow::SizeChanged_revoker SizeChanged(auto_revoke_t, TypedEventHandler<CoreWindow, WindowSizeChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<CoreWindow,WindowSizeChangedEventArgs> SizeChanged;
function onSizeChanged(eventArgs) { /* Your code */ }
coreWindow.addEventListener("sizechanged", onSizeChanged);
coreWindow.removeEventListener("sizechanged", onSizeChanged);
- or -
coreWindow.onsizechanged = onSizeChanged;
Public Custom Event SizeChanged As TypedEventHandler(Of CoreWindow, WindowSizeChangedEventArgs) Implements SizeChanged

事件类型

实现

注解

SizeChanged 事件作为 Window.SizeChanged 事件公开给 XAML 应用,向 HTML 应用公开为 window.resize 事件。

当窗口大小更改或以下属性之一发生更改时,将发生此事件:

适用于