Skip to content

Commit e8f8d70

Browse files
committed
Update toast samples to use ToastArguments
1 parent 634478d commit e8f8d70

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Toast/ToastCode.bind

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ private void PopToast()
22
{
33
// Generate the toast notification content and pop the toast
44
new ToastContentBuilder().SetToastScenario(ToastScenario.Reminder)
5-
.AddToastActivationInfo("action=viewEvent&eventId=1983")
5+
.AddToastActivationInfo(new ToastArguments()
6+
.Set("action", "viewEvent")
7+
.Set("eventId", 1983))
68
.AddText("Adaptive Tiles Meeting")
79
.AddText("Conf Room 2001 / Building 135")
810
.AddText("10:00 AM - 10:30 AM")

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Toast/ToastPage.xaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public ToastPage()
2929
public static ToastContent GenerateToastContent()
3030
{
3131
var builder = new ToastContentBuilder().SetToastScenario(ToastScenario.Reminder)
32-
.AddToastActivationInfo("action=viewEvent&eventId=1983", ToastActivationType.Foreground)
32+
.AddToastActivationInfo(new ToastArguments()
33+
.Set("action", "viewEvent")
34+
.Set("eventId", 1983))
3335
.AddText("Adaptive Tiles Meeting")
3436
.AddText("Conf Room 2001 / Building 135")
3537
.AddText("10:00 AM - 10:30 AM")

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastCode.bind

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ private void PopToast()
44
ToastContentBuilder builder = new ToastContentBuilder();
55

66
// Include launch string so we know what to open when user clicks toast
7-
builder.AddToastActivationInfo("action=viewForecast&zip=98008");
7+
builder.AddToastActivationInfo(new ToastArguments()
8+
.Set("action", "viewForecast")
9+
.Set("zip", 98008));
810

911
// We'll always have this summary text on our toast notification
1012
// (it is required that your toast starts with a text element)

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastPage.xaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public static ToastContent GenerateToastContent()
2929
ToastContentBuilder builder = new ToastContentBuilder();
3030

3131
// Include launch string so we know what to open when user clicks toast
32-
builder.AddToastActivationInfo("action=viewForecast&zip=98008", ToastActivationType.Foreground);
32+
builder.AddToastActivationInfo(new ToastArguments()
33+
.Set("action", "viewForecast")
34+
.Set("zip", 98008));
3335

3436
// We'll always have this summary text on our toast notification
3537
// (it is required that your toast starts with a text element)

0 commit comments

Comments
 (0)