You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MaterialDesignThemes.Wpf/SnackbarAction.cs
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,19 @@
6
6
7
7
namespaceMaterialDesignThemes.Wpf
8
8
{
9
+
/// <summary>
10
+
/// An optional parameter for the <see cref="SnackbarHost.ShowAsync(object, string, SnackbarAction)"/> method to provide an action for the <see cref="Snackbar"/>.
11
+
/// A <see cref="ActionLabel"/> is mandatory to label the action button.
12
+
/// The <see cref="ActionHandler"/> is an optional event handler, which will be called by clicking the action button.
13
+
/// </summary>
9
14
publicclassSnackbarAction
10
15
{
11
16
privatestring_actionLabel;
12
17
privateSnackbarActionEventHandler_actionHandler;
13
18
19
+
/// <summary>
20
+
/// Optional event handler, which will be called by clicking the action button.
21
+
/// </summary>
14
22
publicSnackbarActionEventHandlerActionHandler
15
23
{
16
24
get
@@ -19,6 +27,9 @@ public SnackbarActionEventHandler ActionHandler
19
27
}
20
28
}
21
29
30
+
/// <summary>
31
+
/// Mandatory label for the action button.
32
+
/// </summary>
22
33
publicstringActionLabel
23
34
{
24
35
get
@@ -27,8 +38,17 @@ public string ActionLabel
27
38
}
28
39
}
29
40
41
+
/// <summary>
42
+
/// Creates a new instance.
43
+
/// </summary>
44
+
/// <param name="actionLabel">Mandatory label for the action button.</param>
/// Shows a <see cref="Snackbar"/>. To use, <see cref="SnackbarHost"/> instance must be in a visual tree (typically this may be specified towards the root of a Window's XAML).
70
+
/// </summary>
71
+
/// <param name="message">The message to show in the Snackbar.</param>
72
+
/// <returns></returns>
63
73
publicstaticasyncTaskShowAsync(stringmessage)
64
74
{
65
75
awaitShowAsync(null,message,null);
66
76
}
67
77
78
+
/// <summary>
79
+
/// Shows a <see cref="Snackbar"/>. To use, <see cref="SnackbarHost"/> instance must be in a visual tree (typically this may be specified towards the root of a Window's XAML).
80
+
/// </summary>
81
+
/// <param name="hostIdentifier"><see cref="Identifier"/> of the instance where the Snackbar should be shown. Typically this will match an identifer set in XAML. <c>null</c> is allowed.</param>
82
+
/// <param name="message">The message to show in the Snackbar.</param>
/// Shows a <see cref="Snackbar"/>. To use, <see cref="SnackbarHost"/> instance must be in a visual tree (typically this may be specified towards the root of a Window's XAML).
91
+
/// </summary>
92
+
/// <param name="message">The message to show in the Snackbar.</param>
93
+
/// <param name="snackbarAction">Optional action for the Snackbar. See <see cref="SnackbarAction"/> for details.</param>
/// Shows a <see cref="Snackbar"/>. To use, <see cref="SnackbarHost"/> instance must be in a visual tree (typically this may be specified towards the root of a Window's XAML).
102
+
/// </summary>
103
+
/// <param name="hostIdentifier"><see cref="Identifier"/> of the instance where the Snackbar should be shown. Typically this will match an identifer set in XAML. <c>null</c> is allowed.</param>
104
+
/// <param name="message">The message to show in the Snackbar.</param>
105
+
/// <param name="snackbarAction">Optional action for the Snackbar. See <see cref="SnackbarAction"/> for details.</param>
0 commit comments