Skip to content

The AppWindow class should have a Close method and a Closed event #6386

@Gaoyifei1011

Description

@Gaoyifei1011

The AppWindow class should have a Close method and a Closed event

------------------------

AppWindow 应该提供 Close 方法和 Closed 事件


WinUI 3Window 类 包装了 Closed 事件和 Close 方法,但是对应的 AppWindow 类却只有 Destory 方法,该方法不会触发 Closing 事件,不利于在关闭窗口的时候做一些其他操作(比如弹出对话框提示等等),所以 AppWindow 应该包含 Window 类的一些方法,Close 方法和 Closed 事件

------------------------

WinUI 3Window 类包装了 Closed 事件和 Close 方法,但是对应的 AppWindow 类却只有 Destory 方法,该方法不会触发 Closing 事件,不利于在关闭窗口的时候做一些其他操作(比如弹出对话框提示等等),所以 AppWindow 应该包含 Window 类的一些方法,Close 方法和 Closed 事件

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-WindowingTopics related to the Windowing API in Windows App SDK, including AppWindow, presenters, etc.feature proposalneeds-triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions