public static PickerUC PickAttachmentTypeAndNavigate(List <NamedAttachmentType> attTypes, Action beforeNavigateCallback = null, Action showPhotoPicker = null) { PickerUC pickerUc = new PickerUC(); pickerUc._handleAsAttTypes = true; ObservableCollection <PickableItem> observableCollection = new ObservableCollection <PickableItem>((IEnumerable <PickableItem>)Enumerable.Select <NamedAttachmentType, PickableItem>(attTypes, (Func <NamedAttachmentType, PickableItem>)(a => new PickableItem() { ID = (long)a.AttachmentType, Name = a.Name }))); pickerUc.Items = observableCollection; Action action1 = beforeNavigateCallback; pickerUc._beforeNavigateCallback = action1; Action action2 = showPhotoPicker; pickerUc._showPhotoPicker = action2; pickerUc.ShowPopup(); return(pickerUc); }
public static void ShowPickerForReportReasons(Action <ReportReason> choosenReasonCallback) { PickerUC.ShowPickerFor(ReportContentHelper.GetPredefinedReportReasons(), null, (pi => choosenReasonCallback((ReportReason)pi.ID)), null, null, ""); }