Код: Выделить всё
// Construct the visuals of the toast (using Notifications library)
ToastContent toastContent = new ToastContentBuilder()
.AddToastActivationInfo("action=viewConversation&conversationId=5", ToastActivationType.Foreground)
.AddText("Hello world!")
.GetToastContent();
// And create the toast notification
var toast = new ToastNotification(toastContent.GetXml());
// And then show it
DesktopNotificationManagerCompat.CreateToastNotifier().Show(toast);
Код: Выделить всё
The type 'XmlDocument' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows.Foundation.UniversalApiContract, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'Код: Выделить всё
The type 'ToastNotifier' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows.Foundation.UniversalApiContract, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'Когда я добавляю windows.foundation.universalapicOntract в качестве ссылки из C: \ Program Files (x86) \ kits \ 10 \ Ссылки \ 10.0.18362.0 \ windows.foundation.UniversalApicOntract \ 8.0.0 \ Следующая ошибка: < /p>
type 'toastnotification' существует в обоих windows.foundation.universalapicontract, версия = 8,0,0,0, культура = нейтральная, publickeytogh ContentType = windowsruntime '
Как это исправить?>
Подробнее здесь: https://stackoverflow.com/questions/635 ... in-wpf-app
Мобильная версия