Ejemplo n.º 1
0
        public MainPage()
        {
            InitializeComponent();

            var items = new List <string>(100);

            for (int i = 0; i < 100; i++)
            {
                items.Add("Item - 000" + i);
            }

            //lstItems.ItemsSource = items;
            _SnapshotBtn.Command = new Command((obj) =>
            {
                var func = SnapshotEffect.GetTakeSnapshotFunc(_CV);
                if (func != null)
                {
                    var output = func.Invoke();
                    var img    = new Image();
                    img.Source = ImageSource.FromStream(() =>
                                                        output
                                                        );
                    _SnapshotHolder.Content = img;
                }
            });
        }
Ejemplo n.º 2
0
 protected override void OnAttached()
 {
     try {
         SnapshotEffect.SetTakeSnapshotFunc(Element, TakeViewSnapshot);
     } catch (Exception ex) {
         System.Diagnostics.Debug.WriteLine("Cannot set property on attached control. Error: " + ex.Message);
     }
 }
Ejemplo n.º 3
0
 protected override void OnDetached()
 {
     SnapshotEffect.SetTakeSnapshotFunc(Element, null);
 }