簡體   English   中英

如何打開帶有Toast通知的特定頁面?

[英]How to open a specific page with a Toast notification?

我在這里創建了一個Toast通知,如圖所示,並且使用Launch ()方法,我為其分配了字符'1':

  IToastImageAndText02 toastEng = ToastContentFactory.CreateToastImageAndText02();
    toastEng.TextHeading.Lang = "en";
    toastEng.TextHeading.Text = "1st Sunday of the month";
    toastEng.TextBodyWrap.Text = "Free admission to museums!";
    toastEng.Launch = "1";

我想在這里知道的是在按屏幕上的通知后如何打開特定頁面。 另外,我應該在哪里放置字符“ 1”?

指導和建議表示贊賞。

當用戶點擊敬酒通知時,將啟動應用程序並執行App(.xaml.cs)OnLaunched。

唯一可以做的就是從提供的EventArgs中讀取Launch參數,並確定是否要導航到某個地方。

由於Launch參數是唯一可以發送的參數,因此我建議在其中放置Json(或其他序列化格式)以獲取多個值。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM