public void ShowPopup(string message, string highlightedMessage, string endMessage, Framework.Xaml.ActionForm.ActionSheetVM actionSheet, bool enableMasterContent = false, bool gobackPreviousView = false) { PopupActionSheet = actionSheet; ShowPopupActionSheet = true; EnableMasterContent = enableMasterContent; PopupOption = Framework.Xaml.PopupOptions.RegularPopup; Message = message; HighlightedMessage = highlightedMessage; EndMessage = endMessage; GobackPreviousView = gobackPreviousView; }
public void ShowYesNoConfirmationPopup(ICommand yesCommand, object yesCommandParameter, string message, string highlightedMessage, string endMessage) { var list = new List <Framework.Xaml.ActionForm.ActionItemModel>(); YesActionItemModel.Command = yesCommand; YesActionItemModel.CommandParameter = yesCommandParameter; list.Add(YesActionItemModel); list.Add(NoActionItemModel); var actionSheet = new Framework.Xaml.ActionForm.ActionSheetVM { HasIcon = false, ActionItems = new ObservableCollection <Framework.Xaml.ActionForm.ActionItemModel>(list) }; ShowPopup(message, highlightedMessage, endMessage, actionSheet); }
public static void Show_InlineActionSheet <TItem>(object inlineActionSheetTrigger, EventArgs e, Framework.Xamariner.Controls.ActionForm.InlineActionSheet inlineActionSheet, Func <TItem, Framework.Xaml.ActionForm.ActionSheetVM> getInlineActionSheet) { if (previousUri != Shell.Current.CurrentState.Location || wrapper == null) // 1. Navigated to another Uri, will clear all { wrapper = (Layout <View>)inlineActionSheet.Parent; Reset(); } if (previousInlineActionSheetTrigger != inlineActionSheetTrigger && NavigationVM.PopupVM.PopupOption == Framework.Xaml.PopupOptions.InlineActionSheet) // 1. Clicked another trigger, close InlineActionSheet first, then Open again in step#3 { Elmah.XamarinForms.ViewModels.NavigationVM.PopupVM.HidePopup(); var previousParent = ((Layout <View>)inlineActionSheet.Parent); previousParent.Children.Remove(inlineActionSheet); } else if (Elmah.XamarinForms.ViewModels.NavigationVM.PopupVM.PopupOption == Framework.Xaml.PopupOptions.InlineActionSheet) // 2. Clicked this trigger again to close InlineActionSheet { Elmah.XamarinForms.ViewModels.NavigationVM.PopupVM.HidePopup(); var previousParent = ((Layout <View>)inlineActionSheet.Parent); previousParent.Children.Remove(inlineActionSheet); wrapper.Children.Add(inlineActionSheet); return; } // 3. Show InlineActionSheet previousInlineActionSheetTrigger = inlineActionSheetTrigger; // Add to new Parent Layout var inlinPopupParent = (Grid)((View)inlineActionSheetTrigger).Parent; // Grid, may changed if use button inlinPopupParent.Children.Add(inlineActionSheet); var navigationVM = DependencyService.Resolve <Elmah.MVVMLightViewModels.NavigationVM>(); var item = (TItem)((View)inlineActionSheetTrigger).BindingContext; Framework.Xaml.ActionForm.ActionSheetVM actionFormVM = getInlineActionSheet(item); Elmah.XamarinForms.ViewModels.NavigationVM.PopupVM.ShowInlineActionSheet(actionFormVM); }
public void ShowBuiltInPopup(BuiltInPopupTypes type, string message, string highlightedMessage, string endMessage, ICommand command, bool enableMasterContent = false, bool gobackPreviousView = false) { Framework.Xaml.ActionForm.ActionSheetVM actionSheet; if (type == Framework.Xaml.BuiltInPopupTypes.SaveConfirmation) { actionSheet = GetSavePopupActionSheetVM(command); } else if (type == Framework.Xaml.BuiltInPopupTypes.DeleteConfirmation) { actionSheet = GetDeletePopupActionSheetVM(command); } else if (type == Framework.Xaml.BuiltInPopupTypes.EnableConfirmation) { actionSheet = GetEnableConfirmationPopupActionSheetVM(command); } else if (type == Framework.Xaml.BuiltInPopupTypes.DisableConfirmation) { actionSheet = GetDisableConfirmationPopupActionSheetVM(command); } else if (type == Framework.Xaml.BuiltInPopupTypes.Confirmation) { actionSheet = GetConfirmationPopupActionSheetVM(command); } else if (type == Framework.Xaml.BuiltInPopupTypes.ClosePopup) { actionSheet = GetClosePopupActionSheetVM(); } else if (type == Framework.Xaml.BuiltInPopupTypes.CloseItemControlPopup) { actionSheet = GetCloseItemControlPopupActionSheetVM(); } else { actionSheet = new Framework.Xaml.ActionForm.ActionSheetVM { } }; ShowPopup(message, highlightedMessage, endMessage, actionSheet, enableMasterContent, gobackPreviousView); }
public void ShowVerticalActionSheet(Framework.Xaml.ActionForm.ActionSheetVM actionSheetVM) { EnableMasterContent = false; ActionSheetVM = actionSheetVM; PopupOption = PopupOptions.VerticalActionSheet; }
public void ShowInlineActionSheet(Framework.Xaml.ActionForm.ActionSheetVM actionSheetVM) { EnableMasterContent = true; ActionSheetVM = actionSheetVM; PopupOption = PopupOptions.InlineActionSheet; }
public void ShowItemActions(Framework.Xaml.NavigationActionTypes closeAction = NavigationActionTypes.CloseButtonCloseItemControlPopup, Framework.Xaml.ActionForm.ActionSheetVM footerActionSheet = null) { ListFooterActionSheet = ListFooterActionSheet; }
public void ShowListSelectionActions() { ListFooterActionSheet = ListFooterActionSheet; }
public void ShowGeneralListActions(Framework.Xaml.ActionForm.ActionSheetVM footerActionSheet) { ListFooterActionSheet = footerActionSheet; }