-
-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MessageBox WindowStartupLocation does not work #1045
Labels
bug
Something isn't working
Comments
You need to set the owner of the window first |
Like this: var uiMessageBox = new Wpf.Ui.Controls.MessageBox
{
Title = "test",
Content = "test",
WindowStartupLocation = WindowStartupLocation.CenterOwner
};
uiMessageBox.Owner = Application.Current.MainWindow;
await uiMessageBox.ShowDialogAsync(); |
@maslewandowski Does that fix your issue? If yeas, please close this issue. |
I am also facing the same issue, Even setting the Owner not resolved the issue. Message box always showing in the center of the screen
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When showing the custom Messagebox in namespace Wpf.Ui.Controls.MessageBox it is not possible to set the messagebox start up location to center owner.
therefore the messagebox is always shown at the center location where the app did start.
To Reproduce
Expected behavior
It should be shown in the center of the owner window
Screenshots
No response
OS version
windows 11 pro 23H2 22631.3374
.NET version
Target: net8.0-windows7.0
WPF-UI NuGet version
3.0.0-preview.13
Additional context
No response
The text was updated successfully, but these errors were encountered: