
Hi,
after upgrading to Avalonia 11.1.1 together with Actipro Fundamentals 24.2, UserPrompBuilder dialogs don't prevent interaction with parent window.
I have verified this problem in Samples application.
Avalonia 11.0.11 and 24.1 works correctly.
Hi,
after upgrading to Avalonia 11.1.1 together with Actipro Fundamentals 24.2, UserPrompBuilder dialogs don't prevent interaction with parent window.
I have verified this problem in Samples application.
Avalonia 11.0.11 and 24.1 works correctly.
Hi Pavel,
Thank you for reporting this issue. It appears there was a change in how Avalonia handles Window.ShowDialog(owner) if the Window.Owner property is already set. We will have this fixed for the next release.
The solution is to not set Window.Owner before calling ShowDialog. The WindowBase.Owner property setter is protected, so the workaround requires the use of reflection to set the property. If you place the following in your application startup (like App.Initialize method), this should clear the Owner property and allow the ShowDialog method to work as expected until our fix is available.
UserPromptBuilder.RegisterGlobalConfigureCallback(builder => builder.AfterInitializeWindow(window => {
// HACK: Temporary workaround to allow modal user prompts until it is fixed in Actipro Avalonia Controls v24.2.1
typeof(WindowBase).GetProperty(nameof(WindowBase.Owner))?.SetValue(window, null);
}));
Please log in to a validated account to post comments.