示例#1
0
        public void Run(IBackgroundTaskInstance taskInstance)
        {
            var deferral = taskInstance.GetDeferral();

            ToastNotificationUtilities.ShowMessage("Hello from the background task. ");
            deferral.Complete();
        }
        private void OnShowToast(object sender, RoutedEventArgs e)
        {
            // Important: Enable toast notifications in Package.appxmanifest!

            // Copy code from MyToolkit library if you don't want to use the library
            ToastNotificationUtilities.ShowMessage("Hello world!");
        }