using C1.Xaml.Imaging;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Imaging;
using Windows.UI.Xaml.Navigation;

// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236

namespace ImageSamplesLib2012
{
    public sealed partial class Render : UserControl
    {
        public Render()
        {
            this.InitializeComponent();

            //var gifImage = new C1GifImage(new Uri("ms-appx:/ImageSamplesLib2012/Resources/Babycha.gif"));
            //image.Source = gifImage;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Click();
        }

        private async void Click()
        {
            var bitmap = new C1Bitmap();
            await bitmap.Render(this.source);

            myimage.Source = bitmap.ImageSource;
        }
    }
}
