Skip to content

SnackbarServiceExtensions.Show(ISnackbarService, string, string) method

Defined in

Type: SnackbarServiceExtensions Namespace: CrissCross.Avalonia.UI.Extensions Assembly: CrissCross.Avalonia.UI.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net471

Overloads

  • 1. public static void Show(this ISnackbarService snackbarService, string title, string message)
  • 2. public static void Show(this ISnackbarService snackbarService, string title, string message, ControlAppearance appearance)
  • 3. public static void Show(this ISnackbarService snackbarService, string title, string message, IconElement icon)
  • 4. public static void Show(this ISnackbarService snackbarService, string title, string message, TimeSpan timeout)
  • 5. public static void Show(this ISnackbarService snackbarService, string title, string message, ControlAppearance appearance, TimeSpan timeout)
  • 6. public static void Show(this ISnackbarService snackbarService, string title, string message, IconElement icon, TimeSpan timeout)

1. Overload

public static void Show(this ISnackbarService snackbarService, string title, string message)

Summary: Shows the snackbar. If it is already visible, firstly hides it for a moment, changes its content, and then shows it again.

Parameters

NameTypeDescription
snackbarService[ISnackbarService](#The [ISnackbarService](#
titlestringName displayed on top of snackbar.
messagestringMessage inside the snackbar.

2. Overload

public static void Show(this ISnackbarService snackbarService, string title, string message, ControlAppearance appearance)

Summary: Shows the snackbar. If it is already visible, firstly hides it for a moment, changes its content, and then shows it again.

Parameters

NameTypeDescription
snackbarService[ISnackbarService](#The [ISnackbarService](#
titlestringName displayed on top of snackbar.
messagestringMessage inside the snackbar.
appearance[ControlAppearance](#Display style.

3. Overload

public static void Show(this ISnackbarService snackbarService, string title, string message, IconElement icon)

Summary: Shows the snackbar. If it is already visible, firstly hides it for a moment, changes its content, and then shows it again.

Parameters

NameTypeDescription
snackbarService[ISnackbarService](#The [ISnackbarService](#
titlestringName displayed on top of snackbar.
messagestringMessage inside the snackbar.
icon[IconElement](#Additional icon on the left.

4. Overload

public static void Show(this ISnackbarService snackbarService, string title, string message, TimeSpan timeout)

Summary: Shows the snackbar. If it is already visible, firstly hides it for a moment, changes its content, and then shows it again.

Parameters

NameTypeDescription
snackbarService[ISnackbarService](#The [ISnackbarService](#
titlestringName displayed on top of snackbar.
messagestringMessage inside the snackbar.
timeoutTimeSpanThe time after which the snackbar should disappear.

5. Overload

public static void Show(this ISnackbarService snackbarService, string title, string message, ControlAppearance appearance, TimeSpan timeout)

Summary: Shows the snackbar. If it is already visible, firstly hides it for a moment, changes its content, and then shows it again.

Parameters

NameTypeDescription
snackbarService[ISnackbarService](#The [ISnackbarService](#
titlestringName displayed on top of snackbar.
messagestringMessage inside the snackbar.
appearance[ControlAppearance](#Display style.
timeoutTimeSpanThe time after which the snackbar should disappear.

6. Overload

public static void Show(this ISnackbarService snackbarService, string title, string message, IconElement icon, TimeSpan timeout)

Summary: Shows the snackbar. If it is already visible, firstly hides it for a moment, changes its content, and then shows it again.

Parameters

NameTypeDescription
snackbarService[ISnackbarService](#The [ISnackbarService](#
titlestringName displayed on top of snackbar.
messagestringMessage inside the snackbar.
icon[IconElement](#Additional icon on the left.
timeoutTimeSpanThe time after which the snackbar should disappear.