Skip to content

MessageBox automatically closes #11016

@lykyngx

Description

@lykyngx

Description

I've encountered an issue where setting the MessageBox title to "Caption" causes the message box to automatically close after being displayed for a few seconds. Why does this happen? I'm currently using .NET 5.

Reproduction Steps

private void Button_Click(object sender, RoutedEventArgs e)
{
    MessageBox.Show("MessageBoxText", "Caption");
}

Expected behavior

Normally, the MessageBox should only close when I click the close button or the OK button.

Actual behavior

Actually, when the title is set to "Caption", the MessageBox will automatically close after being displayed for a few seconds.

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    InvestigateRequires further investigation by the WPF team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions