public static void ShowPickerFor(ObservableCollection <PickableItem> items, PickableItem selectedItem, Action <PickableItem> itemSelectedCallback, Action <PickableItem> toolButtonTapCallback = null, Action mainToolButtonTapCallback = null, string title = null) { new PickerUC() { _itemSelectedCallback = itemSelectedCallback, _toolButtonTapCallback = toolButtonTapCallback, _mainButtonTapCallback = mainToolButtonTapCallback, Items = items, _itemToSelect = selectedItem, _title = title }.ShowPopup(); }
private void HandleItemSelection(PickableItem pickableItem) { if (this._handleAsAttTypes) { if (this._beforeNavigateCallback != null) { this._beforeNavigateCallback(); } PickableItem pickableItem1 = pickableItem; long id = pickableItem1.ID; if (pickableItem1.ID == 1L) { Navigator.Current.NavigateToPhotoAlbums(true, 0, false, 0); } if (id == 2L) { Navigator.Current.NavigateToVideo(true, 0, false, false); } if (id == 3L) { Navigator.Current.NavigateToAudio(1, 0, false, 0, 0, ""); } if (id == 4L) { Navigator.Current.NavigateToDocumentsPicker(1); } if (id == 7L) { Navigator.Current.NavigateToMap(true, 0.0, 0.0); } if (id == 8L && this._showPhotoPicker != null) { this._ds.Hide(); this._showPhotoPicker(); } if (id != 9L) { return; } this._ds.Hide(); FileOpenPicker fileOpenPicker = new FileOpenPicker(); List <string> .Enumerator enumerator = VKConstants.SupportedVideoExtensions.GetEnumerator(); try { while (enumerator.MoveNext()) { string current = enumerator.Current; fileOpenPicker.FileTypeFilter.Add(current); } } finally { enumerator.Dispose(); } ((IDictionary <string, object>)fileOpenPicker.ContinuationData)["Operation"] = "VideoFromPhone"; fileOpenPicker.PickSingleFileAndContinue(); } else { this._ds.Hide(); this._itemSelectedCallback(pickableItem); } }