Skip to content

[Bug]: The Close method cannot be called in code when using a modal window #152

@hoshiizumiya

Description

@hoshiizumiya

Describe the bug

As dev/DevWinUI/Common/Window/ModalWindow.cs.
Idk why I can't call Close() in the code if I use ModalWindow.

Steps to reproduce the bug

You can use btnCancel.Click += (s, e) => Close(); if you use Window, but can't in the ModalWindow.

Expected behavior

No response

Screenshots

No response

NuGet package version

None

IDE

Visual Studio 2026

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions