lepoco / wpfui

WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.

Home Page:https://wpfui.lepo.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snackbar no longer appears when setting Opacity via App.xaml style

jonmotos opened this issue · comments

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?)
image

When setting the opacity to 1 via App.xaml Application.Resources, snackbars no longer appear at all.

To Reproduce

  1. Create a SnackbarPresenter via Grid
<Grid>
  <ContentPresenter/>
  <SnackbarPresenter/>
</Grid>
  1. 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>
  1. 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.