Beispiel #1
0
        private async void viewImage_Click(object sender, RoutedEventArgs e)
        {
            var    renderer    = new ImageRenderer(new HostConfig(), this.Resources);
            var    imageStream = renderer.RenderAdaptiveCard(this._card, 480);
            string path        = System.IO.Path.GetRandomFileName() + ".png";

            using (FileStream fileStream = new FileStream(path, FileMode.Create))
            {
                await imageStream.CopyToAsync(fileStream);
            }
            Process.Start(path);
        }