![](/img/trans.png)
[英]Host a standard UWP control in a WPF app using XAML Islands
[英]Is it possible to receive push notifications from WNS in a WPF app, which uses Xaml Islands?
我正在 WPF 中創建一個應用程序,並使用 Xaml Islands 為其添加 UWP 外觀。
我想使用 Windows 推送通知服務 (WNS) 從 Amazon SNS 接收推送通知。 按照本文創建通知渠道,我嘗試運行此代碼:
await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
但它因以下非常詳細的異常而失敗: Element not found. (0x80070490)
Element not found. (0x80070490)
。 我也嘗試在自定義 UWP 組件中運行它,但結果是一樣的。
所以,我的問題是,是否可以使用此類應用程序從 WNS 接收推送通知?
經過幾天的調查和尋找,我發現答案是:是的。 應該做的事情非常簡單,就是在解決方案中運行 Desktop Bridge 項目,而不是WPF
應用程序,這是我嘗試做的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.