dotnet / dotnet/wpf

ComponentDispatcher.(Enter|Leave)ThreadModal should be called by System.Windows.MessageBox.Show

Open
#11,038 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Description

Window.ShowDialog calls (Enter|Leave)ThreadModal but MessageBox.Show does not. In windows forms, Application.(Enter|Leave)ThreadModal was called by both.

### Reproduction Steps

```
ComponentDispatcher.EnterThreadModal += (o, e) => { whatever(); };
MessageBox.Show("blah");
```

### Expected behavior

`whatever()` should be called

### Actual behavior

it's not

### Regression?

_No response_

### Known Workarounds

_No response_

### Impact

_No response_

### Configuration

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.