public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Register <MvxTabLayoutPresentationAttribute>(ShowTabLayout, CloseViewPagerFragment); AttributeTypesToActionsDictionary.Register <MvxViewPagerFragmentPresentationAttribute>(ShowViewPagerFragment, CloseViewPagerFragment); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Register <MvxPagePresentationAttribute>(ShowPage, ClosePage); AttributeTypesToActionsDictionary.Register <MvxSplitViewPresentationAttribute>(ShowSplitView, CloseSplitView); AttributeTypesToActionsDictionary.Register <MvxRegionPresentationAttribute>(ShowRegionView, CloseRegionView); AttributeTypesToActionsDictionary.Register <MvxDialogViewPresentationAttribute>(ShowDialog, CloseDialog); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Register <MvxActivityPresentationAttribute>(ShowActivity, CloseActivity); AttributeTypesToActionsDictionary.Register <MvxFragmentPresentationAttribute>(ShowFragment, CloseFragment); AttributeTypesToActionsDictionary.Register <MvxDialogFragmentPresentationAttribute>(ShowDialogFragment, CloseFragmentDialog); AttributeTypesToActionsDictionary.Register <MvxTabLayoutPresentationAttribute>(ShowTabLayout, CloseViewPagerFragment); AttributeTypesToActionsDictionary.Register <MvxViewPagerFragmentPresentationAttribute>(ShowViewPagerFragment, CloseViewPagerFragment); }
public MvxAlertIosViewPresenter(IUIApplicationDelegate applicationDelegate, UIWindow window) : base(applicationDelegate, window) { AttributeTypesToActionsDictionary.Register <MvxAlertPresentationAttribute>( ShowAlertView, CloseAlertView ); }
public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Register <MvxSidebarPresentationAttribute>( async(viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(await ShowSidebarViewController(viewController, attribute, request)); }, async(viewModel, attribute) => CloseSidebarViewController(viewModel, attribute)); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Register <ModalPresentationAttribute>( (_, attribute, request) => { var view = WpfViewLoader.CreateView(request); return(ShowModalWindow(view, attribute, request)); }, (viewModel, _) => CloseWindow(viewModel)); base.RegisterAttributeTypes(); }
public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Register <CustomMvxContentPresentationAttribute>( (viewType, attribute, request) => { var view = WpfViewLoader.CreateView(request); return(ShowContentView(view, (CustomMvxContentPresentationAttribute)attribute, request)); }, (viewModel, attribute) => { return(CloseContentView(viewModel)); }); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Register <MvxRootPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowRootViewController(viewController, attribute, request)); }, CloseRootViewController); AttributeTypesToActionsDictionary.Register <MvxChildPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowChildViewController(viewController, attribute, request)); }, CloseChildViewController); AttributeTypesToActionsDictionary.Register <MvxTabPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowTabViewController(viewController, attribute, request)); }, CloseTabViewController); AttributeTypesToActionsDictionary.Register <MvxPagePresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowPageViewController(viewController, attribute, request)); }, ClosePageViewController); AttributeTypesToActionsDictionary.Register <MvxModalPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowModalViewController(viewController, attribute, request)); }, CloseModalViewController); AttributeTypesToActionsDictionary.Register <MvxMasterDetailPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowMasterDetailSplitViewController(viewController, attribute, request)); }, CloseMasterSplitViewController); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Register <MvxWindowPresentationAttribute>( async(viewType, attribute, request) => { var view = await WpfViewLoader.CreateView(request).ConfigureAwait(false); return(await ShowWindow(view, attribute, request).ConfigureAwait(false)); }, (viewModel, attribute) => CloseWindow(viewModel)); AttributeTypesToActionsDictionary.Register <MvxContentPresentationAttribute>( async(viewType, attribute, request) => { var view = await WpfViewLoader.CreateView(request).ConfigureAwait(false); return(await ShowContentView(view, attribute, request).ConfigureAwait(false)); }, (viewModel, attribute) => CloseContentView(viewModel)); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Register <MvxWindowPresentationAttribute>( (viewType, attribute, request) => { var viewController = (NSViewController)this.CreateViewControllerFor(request); return(ShowWindowViewController(viewController, (MvxWindowPresentationAttribute)attribute, request)); }, (viewModel, attribute) => Close(viewModel)); AttributeTypesToActionsDictionary.Register <MvxContentPresentationAttribute>( (viewType, attribute, request) => { var viewController = (NSViewController)this.CreateViewControllerFor(request); return(ShowContentViewController(viewController, (MvxContentPresentationAttribute)attribute, request)); }, (viewModel, attribute) => Close(viewModel)); AttributeTypesToActionsDictionary.Register <MvxModalPresentationAttribute>( (viewType, attribute, request) => { var viewController = (NSViewController)this.CreateViewControllerFor(request); return(ShowModalViewController(viewController, (MvxModalPresentationAttribute)attribute, request)); }, (viewModel, attribute) => Close(viewModel)); AttributeTypesToActionsDictionary.Register <MvxSheetPresentationAttribute>( (viewType, attribute, request) => { var viewController = (NSViewController)this.CreateViewControllerFor(request); return(ShowSheetViewController(viewController, (MvxSheetPresentationAttribute)attribute, request)); }, (viewModel, attribute) => Close(viewModel)); AttributeTypesToActionsDictionary.Register <MvxTabPresentationAttribute>( (viewType, attribute, request) => { var viewController = (NSViewController)this.CreateViewControllerFor(request); return(ShowTabViewController(viewController, (MvxTabPresentationAttribute)attribute, request)); }, (viewModel, attribute) => Close(viewModel)); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Register <MvxRootPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowRootViewController(viewController, attribute, request)); }, CloseRootViewController); AttributeTypesToActionsDictionary.Register <MvxChildPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowChildViewController(viewController, attribute, request)); }, CloseChildViewController); AttributeTypesToActionsDictionary.Register <MvxTabPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowTabViewController(viewController, attribute, request)); }, CloseTabViewController); AttributeTypesToActionsDictionary.Register <MvxPagePresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowPageViewController(viewController, attribute, request)); }, ClosePageViewController); AttributeTypesToActionsDictionary.Register <MvxModalPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowModalViewController(viewController, attribute, request)); }, CloseModalViewController); AttributeTypesToActionsDictionary.Register <MvxSplitViewPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); var splitAttribute = attribute; switch (splitAttribute.Position) { case MasterDetailPosition.Master: return(ShowMasterSplitViewController(viewController, splitAttribute, request)); case MasterDetailPosition.Detail: return(ShowDetailSplitViewController(viewController, splitAttribute, request)); } return(Task.FromResult(true)); }, (viewModel, attribute) => { var splitAttribute = attribute; switch (splitAttribute.Position) { case MasterDetailPosition.Master: return(CloseMasterSplitViewController(viewModel, splitAttribute)); case MasterDetailPosition.Detail: default: return(CloseDetailSplitViewController(viewModel, splitAttribute)); } }); }
public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Register <MvxPopupPagePresentationAttribute>(ShowPopupPage, ClosePopupPage); }
public override void RegisterAttributeTypes() { if (AttributeTypesToActionsDictionary == null) { throw new InvalidOperationException("Cannot register attribute types on null dictionary"); } AttributeTypesToActionsDictionary.Register <MvxRootPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowRootViewController(viewController, attribute, request)); }, CloseRootViewController); AttributeTypesToActionsDictionary.Register <MvxChildPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowChildViewController(viewController, attribute, request)); }, CloseChildViewController); AttributeTypesToActionsDictionary.Register <MvxTabPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowTabViewController(viewController, attribute, request)); }, CloseTabViewController); AttributeTypesToActionsDictionary.Register <MvxPagePresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowPageViewController(viewController, attribute, request)); }, ClosePageViewController); AttributeTypesToActionsDictionary.Register <MvxModalPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(ShowModalViewController(viewController, attribute, request)); }, CloseModalViewController); AttributeTypesToActionsDictionary.Register <MvxSplitViewPresentationAttribute>( (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); var splitAttribute = attribute; return(splitAttribute.Position switch { MasterDetailPosition.Master => ShowMasterSplitViewController(viewController, splitAttribute, request), MasterDetailPosition.Detail => ShowDetailSplitViewController(viewController, splitAttribute, request), _ => Task.FromResult(true) }); },
public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Register <MvxCustomMasterDetailPagePresentationAttribute>(ShowMasterDetailPage, CloseMasterDetailPage); }
public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Register <MvxBottomNavigationViewPresentationAttribute>(ShowBottomNavigationFragment, CloseFragment); }
public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Register <MvxWindowPresentationAttribute>(ShowWindow, CloseWindow); }