Hello everyone.
Long time no see.
I have a problem in displaying a toast notification from my VB Windows Store app. I am using VS 2013 and Windows 8.1
Here is my MainPage's code :
Imports Windows.UI.Notifications 'Notifications Namespace
Imports System.Text
Imports Windows.Data.Xml.Dom
Public NotInheritable Class MainPage
Inherits Page
Private tttToastTemplate As ToastTemplateType
Private xmlToast As XmlDocument = New XmlDocument
Private tnToast As ToastNotification
Dim strXML As String
' Private tnmNotify As ToastNotificationManager
Private Sub btTextToast1_Click(sender As Object, e As RoutedEventArgs) Handles btTextToast1.Click
Try
tttToastTemplate = ToastTemplateType.ToastText01
strXML = "<Toast><Visual Version='1'><binding template='ToastText01'><text id='1'>Message 1</text></binding></visual></toast>"
xmlToast.LoadXml(strXML)
tnToast = New ToastNotification(xmlToast)
ToastNotificationManager.CreateToastNotifier().Show(tnToast)
Catch ex As Exception
tbError.Text = ex.Message
End Try
End Sub
End Class
It gives me the following error : Exception from HRESULT: 0xc00ce6d.
Google doesn't give me any details concerning this.
I just want to show a Toast notification from VB. Can anyone help please?