private void HandleBrewClickWithToast(object sender, RoutedEventArgs e)
        {
            // make up some coffee...
            var barista = new Barista();
            var result  = barista.BrewMeAnything();

            // get the XML...
            var xml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText01);

            // add some audio...
            var audio = xml.CreateElement("audio");

            audio.SetAttribute("src", "ms-winsoundevent:Notification.IM");
            var toast = xml.SelectSingleNode("//toast");

            toast.AppendChild(audio);

            // replace the contents of 'text'...
            var text = toast.SelectSingleNode("//text");

            text.InnerText = string.Format("Here's your drink:\r\n{0}", result);

            // ask the OS to show it...
            var notification = new ToastNotification(xml);

            ToastNotificationManager.CreateToastNotifier().Show(notification);
        }
        private void HandleBrewClickWithTile(object sender, RoutedEventArgs e)
        {
            // make up some coffee...
            var barista = new Barista();
            var result = barista.BrewMeAnything();

            // update...
            UpdateLargeTile(result);
            UpdateSmallTile(result);
        }
        private async void HandleBrewClick(object sender, RoutedEventArgs e)
        {
            // make up some coffee...
            var barista = new Barista();
            var result = barista.BrewMeAnything();

            // share the result...
            var dialog = new MessageDialog(result.ToString());
            await dialog.ShowAsync();
        }
        private void HandleBrewClickWithTile(object sender, RoutedEventArgs e)
        {
            // make up some coffee...
            var barista = new Barista();
            var result  = barista.BrewMeAnything();

            // update...
            UpdateLargeTile(result);
            UpdateSmallTile(result);
        }
        private async void HandleBrewClick(object sender, RoutedEventArgs e)
        {
            // make up some coffee...
            var barista = new Barista();
            var result  = barista.BrewMeAnything();

            // share the result...
            var dialog = new MessageDialog(result.ToString());
            await dialog.ShowAsync();
        }
        private void HandleBrewClickWithToast(object sender, RoutedEventArgs e)
        {
            // make up some coffee...
            var barista = new Barista();
            var result = barista.BrewMeAnything();

            // get the XML...
            var xml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText01);

            // add some audio...
            var audio = xml.CreateElement("audio");
            audio.SetAttribute("src", "ms-winsoundevent:Notification.IM");
            var toast = xml.SelectSingleNode("//toast");
            toast.AppendChild(audio);

            // replace the contents of 'text'...
            var text = toast.SelectSingleNode("//text");
            text.InnerText = string.Format("Here's your drink:\r\n{0}", result);

            // ask the OS to show it...
            var notification = new ToastNotification(xml);
            ToastNotificationManager.CreateToastNotifier().Show(notification);
        }