wpfui icon indicating copy to clipboard operation
wpfui copied to clipboard

Fix: MessageBox does not support WindowStartupLocation

Open textGamex opened this issue 1 year ago • 0 comments

Pull request type

Please check the type of change your PR introduces:

  • [ ] Update
  • [x] Bugfix
  • [ ] Feature
  • [ ] Code style update (formatting, renaming)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] Documentation content changes

What is the current behavior?

The MessageBox will only display in the center of the screen, and the WindowStartupLocation is not effective.

Issue Number: #1045

What is the new behavior?

  • fix this bug.

Other information

Using reflection to invoke a private property of the Window class to help determine if the MessageBox can be displayed centered on the Owner.

In the .NET 8 assembly, I utilized UnsafeAccessor to enhance performance.

textGamex avatar Jun 13 '24 16:06 textGamex