Setting ThemeMode on a window causes a button to be positioned differently
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### Description
Setting `ThemeMode` on a window causes a button to be completely repositioned.
### Reproduction Steps
1. Brand new WPF project.
2. Add a button to the grid and set the width/height to something small.
3. Set the `ThemeMode` property on the window to anything other than `None`.
```xaml
```
Before `ThemeMode` is set:

After `ThemeMode` is set:

### Expected behavior
Don't alter the layout.
### Actual behavior
Layout is altered.
### Regression?
_No response_
### Known Workarounds
_No response_
### Impact
_No response_
### Configuration
- Visual Studio 2022 17.12 GA
- .NET 9 GA
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.