Skip to content
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

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

Open
jonmotos opened this issue May 13, 2024 · 0 comments
Open

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

jonmotos opened this issue May 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jonmotos
Copy link

jonmotos commented May 13, 2024

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.

@jonmotos jonmotos added the bug Something isn't working label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant