Material.Avalonia icon indicating copy to clipboard operation
Material.Avalonia copied to clipboard

Allow changing snackbar element template

Open SKProCH opened this issue 6 months ago • 0 comments

Discussed in https://github.com/AvaloniaCommunity/Material.Avalonia/discussions/464

Originally posted by alessandrofrancesconi June 30, 2025 I use the SnackbarHost to show some snackbar messages to the user:

<materialControls:SnackbarHost Grid.Row="1" Name="MainSnackbarHost" HostName="MainSnackbarHost">
    <ScrollViewer Name="MainScroller"
        <!-- -->
    </ScrollViewer>
</materialControls:SnackbarHost>

The result is a gray box with basic UI: image

I would like to enrich it by adding a Material Icon to the left. Is it possible to customize it in such a way? After this, I will try to set the Icon depending on the message type (Warning, Success, Error, ...), but this is the second step of the thing :)


Would be nice to add customizable template for ItemsControl and/or allow some customization for types inherited from SnackbarModel without modifying actual theme.

SKProCH avatar Jun 30 '25 00:06 SKProCH