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; } }); }
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); } }
protected override void OnDetached() { SnapshotEffect.SetTakeSnapshotFunc(Element, null); }