Open SCLD-ARowe opened 3 months ago
Is this in a released version? I'm still having the same issues using MessageBox 3.1.6 with both Avalonia 11.1.0 and 11.1.1.
I can confirm it still happens on browser with Avalonia 11.1.1 and MessageBox 3.1.6.
This issue also occurs on my Android app (both emulator and hardware) using the very latest Avalonia 11.1.2 and MessageBox 3.1.6. ShowWindowDialogAsync works as expected on the Windows/Linux/MacOS app versions but ShowAsPopupAsync displays a transparent non-modal popup in both light and dark modes. Hopefully nobody minds if I attach a light mode image.
This issue also occurs on my Android app (both emulator and hardware) using the very latest Avalonia 11.1.2 and MessageBox 3.1.6. ShowWindowDialogAsync works as expected on the Windows/Linux/MacOS app versions but ShowAsPopupAsync displays a transparent non-modal popup in both light and dark modes. Hopefully nobody minds if I attach a light mode image.
usercontrol background=white
@Upanc Sorry please explain "usercontrol background=white"
A workaround is to manipulate the UserControl via styles. But that's not pretty!
<Application.Styles>
<FluentTheme DensityStyle="Compact"/>
<Style Selector=":is(UserControl)[Padding=15]">
<Setter Property="Background" Value="{DynamicResource Box}"/>
</Style>
</Application.Styles>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<SolidColorBrush x:Key='Box'>White</SolidColorBrush>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<SolidColorBrush x:Key='Box'>Black</SolidColorBrush>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</Application.Resources>
(UserControl of MsBoxStandardView is the only one with padding 15 ;-)
@Upanc Sorry please explain "usercontrol background=white"
A workaround is to manipulate the UserControl via styles. But that's not pretty!
<Application.Styles> <FluentTheme DensityStyle="Compact"/> <Style Selector=":is(UserControl)[Padding=15]"> <Setter Property="Background" Value="{DynamicResource Box}"/> </Style> </Application.Styles> <Application.Resources> <ResourceDictionary> <ResourceDictionary.ThemeDictionaries> <ResourceDictionary x:Key="Light"> <SolidColorBrush x:Key='Box'>White</SolidColorBrush> </ResourceDictionary> <ResourceDictionary x:Key="Dark"> <SolidColorBrush x:Key='Box'>Black</SolidColorBrush> </ResourceDictionary> </ResourceDictionary.ThemeDictionaries> </ResourceDictionary> </Application.Resources>
(UserControl of MsBoxStandardView is the only one with padding 15 ;-)
here MsBoxCustomView.axaml,It's useful to me
I haven't found any examples or Wiki of how to use Custom. I just want to use MsBox Standard from the nuget package without any adjustments and not manipulate the source code.
What does your solution look like in the code?
I haven't found any examples or Wiki of how to use Custom. I just want to use MsBox Standard from the nuget package without any adjustments and not manipulate the source code.
What does your solution look like in the code?
clone this project and build
@Upanc, @EishaV: Thank you both for the feedback, this is good stuff, I'll fiddle with it and see if I can resolve the issue. If I can get it working, I'll post my solution.
I got ShowWindowDialogAsync to do the job, although I don't know how to hide the title bar buttons:
var box = MessageBoxManager.GetMessageBoxStandard("Not Implemented", "Opening of sensitivity parameters\nis not yet implemented.", ButtonEnum.Ok);
var result = box.ShowWindowDialogAsync(TopLevel.GetTopLevel(this) as Window);
Hi, after upgrading to Avalonia 11.1.0 the ShowAsPopupAsync() method is no longer working as expected. When displayed it no longer grays out the screen behind it nor does it prevent a user from interacting with that screen. It also sometimes displays with the text behind it overlayed on top of the popup.
None of these were issues with 11.0.11. It's only after the latest upgrade. ShowWindowDialogAsync is working as expected, so I am using that instead for now.