wpfui
wpfui copied to clipboard
Snackbar no longer appears when setting Opacity via App.xaml style
Describe the bug
I am attempting to set the opacity of all my snackbars to 1 (fully opaque) in order to prevent display oddities that occur when displaying snackbars over other controls (pictured, perhaps another bug?)
When setting the opacity to 1 via App.xaml Application.Resources, snackbars no longer appear at all.
To Reproduce
- Create a SnackbarPresenter via Grid
<Grid>
<ContentPresenter/>
<SnackbarPresenter/>
</Grid>
- Set the Snackbar style in Application.Resources
<Application ...>
<Application.Resources>
<ResourceDictionary>
<Style TargetType="ui:Snackbar">
<Setter Property="Opacity" Value="0"/>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>
- Set the Snackbar content via SnackbarService
Expected behavior
I would expect the opacity of the Snackbar to be 1 and the Snackbar to appear as usual.
Screenshots
No response
OS version
Windows 11
.NET version
Net8.0-Windows
WPF-UI NuGet version
3.0.4
Additional context
It appears ANY property set this way prevents a snackbar from appearing. At the end of the day, what I really want to be able to do is have a clear way to prevent the snackbar from having any transparency. I believe by default it should be opaque. I would be happy to add an example Snackbar usage to the documentation.