我想在此示例中为Windows 10中的操作中心创建简单的Toast通知.但我在第2步遇到了问题:
using Windows.UI.Notifications;
Run Code Online (Sandbox Code Playgroud)
它失踪了.但是我花了很多时间才找到它而没有结果.我真的不知道我在哪里可以找到或至少下载它.
我尝试了什么:
Windows.UI.dll在C:\Windows\System32,但是当我尝试将其添加为引用到项目中,我得到这个错误.即使在我尝试复制它并使其完全可访问之后,也没有任何改变Run Code Online (Sandbox Code Playgroud)<PropertyGroup> <TargetPlatformVersion>10.0</TargetPlatformVersion> </PropertyGroup>
System.Runtime.dll参考可能对您无用的示例代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Toolkit.Uwp.Notifications;
using Microsoft.QueryStringDotNET;
using Windows.UI.Notifications;
namespace MessagerClient.Notifications {
class DefaultWindowsNotification {
public static void notificationTest() {
string title = "Andrew sent you a picture";
string content = "Check this out, Happy Canyon in Utah!";
string image = "http://blogs.msdn.com/something.jpg";
string logo = "ms-appdata:///local/Andrew.jpg";
ToastVisual …Run Code Online (Sandbox Code Playgroud)