Class MBSnackbarSettings
Settings for an individual snackbar notification determining all aspects controlling it's markup and behaviour. All parameters are optional with defaults defined in the MBSnackbarServiceConfiguration that you define when creating the snackbar service.
public class MBSnackbarSettings
- Inheritance
-
MBSnackbarSettings
- Inherited Members
Constructors
MBSnackbarSettings()
public MBSnackbarSettings()
Properties
Action
The action that is performed when the button in the snackbar is clicked (optional. if set, ActionText must also be set).
public Action Action { get; set; }
Property Value
ActionText
The text to display in the action button in the snackbar (optional. if set, Action must also be set).
public string ActionText { get; set; }
Property Value
AdditionalClass
The optional additional class to apply to the snackbar surface
public string AdditionalClass { get; set; }
Property Value
CloseMethod
Snackbars are intended to dismiss on their own after a few seconds, but a dedicated dismiss icon may be optionally included as well for accessibility purposes. By default, a dismiss icon is displayed. This can be disabled by setting this property to false.
public MBNotifierCloseMethod? CloseMethod { get; set; }
Property Value
Leading
By default, snackbars are centered horizontally within the viewport. On larger screens, they can optionally be displayed on the leading edge of the screen (the left side in LTR, or the right side in RTL) by setting this property to true. Default: false.
public bool? Leading { get; set; }
Property Value
- bool?
Message
The message to be displayed in the snackbar.
public string Message { get; set; }
Property Value
Stacked
Action buttons with long text should be positioned below the label instead of alongside it. This can be accomplished by setting this property to true. Default: false.
public bool? Stacked { get; set; }
Property Value
- bool?
Timeout
The snackbar's timeout in milliseconds. Minimum value is 4000 (4 seconds), maximum value is 10000 (10s). Use -1 to disable.
public int? Timeout { get; set; }
Property Value
- int?