public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Add( typeof(NestedPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = showNestedViewController, CloseAction = (viewModel, attribute) => false }); AttributeTypesToActionsDictionary.Add( typeof(ModalCardPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = showModalCardViewController, CloseAction = (viewModel, attribute) => CloseModalViewController(viewModel, (MvxModalPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(ModalDialogPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = showModalDialogViewController, CloseAction = (viewModel, attribute) => CloseModalViewController(viewModel, (MvxModalPresentationAttribute)attribute) }); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Add( typeof(MvxPagePresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowPage(view, attribute, request), CloseAction = (viewModel, attribute) => ClosePage(viewModel, attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxSplitViewPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowSplitView(view, (MvxSplitViewPresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseSplitView(viewModel, (MvxSplitViewPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxRegionPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowRegionView(view, (MvxRegionPresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseRegionView(viewModel, (MvxRegionPresentationAttribute)attribute) }); }
public virtual void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Add( typeof(MvxWindowPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var view = WpfViewLoader.CreateView(request); ShowWindow(view, (MvxWindowPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseWindow(viewModel) }); AttributeTypesToActionsDictionary.Add( typeof(MvxContentPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var view = WpfViewLoader.CreateView(request); ShowContentView(view, (MvxContentPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseContentView(viewModel) }); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Add( typeof(MvxActivityPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowActivity(view, (MvxActivityPresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseActivity(viewModel, (MvxActivityPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxFragmentPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowFragment(view, (MvxFragmentPresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseFragment(viewModel, (MvxFragmentPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxDialogFragmentPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowDialogFragment(view, (MvxDialogFragmentPresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseFragmentDialog(viewModel, (MvxDialogFragmentPresentationAttribute)attribute) }); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Add( typeof(DrawerLayoutPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowDrawerLayoutRelatedFragment( (DrawerLayoutPresentationAttribute)attribute, request) }); base.RegisterAttributeTypes(); }
public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Add( typeof(RgModalPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowModal(view, (RgModalPresentationAttribute)attribute, request), CloseAction = (view, attribute) => CloseModal(view, (RgModalPresentationAttribute)attribute) }); }
public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Add(typeof(OutletBasedPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var view = WpfViewLoader.CreateView(request); return(ShowInLayoutView(view, (OutletBasedPresentationAttribute)attribute, request)); }, CloseAction = (viewModel, attribute) => CloseLayoutView(viewModel, (OutletBasedPresentationAttribute)attribute) }); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Add( typeof(MvxCarouselPagePresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowCarouselPage(view, (MvxCarouselPagePresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseCarouselPage(viewModel, (MvxCarouselPagePresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxContentPagePresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowContentPage(view, (MvxContentPagePresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseContentPage(viewModel, (MvxContentPagePresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxMasterDetailPagePresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowMasterDetailPage(view, (MvxMasterDetailPagePresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseMasterDetailPage(viewModel, (MvxMasterDetailPagePresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxModalPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowModal(view, (MvxModalPresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseModal(viewModel, (MvxModalPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxNavigationPagePresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowNavigationPage(view, (MvxNavigationPagePresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseNavigationPage(viewModel, (MvxNavigationPagePresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxTabbedPagePresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowTabbedPage(view, (MvxTabbedPagePresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseTabbedPage(viewModel, (MvxTabbedPagePresentationAttribute)attribute) }); }
public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Add(typeof(AnimatedRootPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); ShowAnimatedRootViewController(viewController, (AnimatedRootPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseAnimatedRootViewController(viewModel, (AnimatedRootPresentationAttribute)attribute) }); }
public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Add( typeof(MvxSidebarPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = async(viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); return(await ShowSidebarViewController(viewController, (MvxSidebarPresentationAttribute)attribute, request)); }, CloseAction = async(viewModel, attribute) => CloseSidebarViewController(viewModel, (MvxSidebarPresentationAttribute)attribute) }); }
public override void RegisterAttributeTypes() { base.RegisterAttributeTypes(); AttributeTypesToActionsDictionary.Add( typeof(MvxTabLayoutPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowTabLayout(view, (MvxTabLayoutPresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseViewPagerFragment(viewModel, (MvxViewPagerFragmentPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxViewPagerFragmentPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (view, attribute, request) => ShowViewPagerFragment(view, (MvxViewPagerFragmentPresentationAttribute)attribute, request), CloseAction = (viewModel, attribute) => CloseViewPagerFragment(viewModel, (MvxViewPagerFragmentPresentationAttribute)attribute) }); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Add( typeof(MvxRootPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); ShowRootViewController(viewController, (MvxRootPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseRootViewController(viewModel, (MvxRootPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxChildPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); ShowChildViewController(viewController, (MvxChildPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseChildViewController(viewModel, (MvxChildPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxTabPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); ShowTabViewController(viewController, (MvxTabPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseTabViewController(viewModel, (MvxTabPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxModalPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); ShowModalViewController(viewController, (MvxModalPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseModalViewController(viewModel, (MvxModalPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxMasterSplitViewPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); ShowMasterSplitViewController(viewController, (MvxMasterSplitViewPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseMasterSplitViewController(viewModel, (MvxMasterSplitViewPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxDetailSplitViewPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); ShowDetailSplitViewController(viewController, (MvxDetailSplitViewPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseDetailSplitViewController(viewModel, (MvxDetailSplitViewPresentationAttribute)attribute) }); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Add( typeof(MvxRootPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); ShowRootViewController(viewController, (MvxRootPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseRootViewController(viewModel, (MvxRootPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxChildPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); ShowChildViewController(viewController, (MvxChildPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseChildViewController(viewModel, (MvxChildPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxTabPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); ShowTabViewController(viewController, (MvxTabPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseTabViewController(viewModel, (MvxTabPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxModalPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); ShowModalViewController(viewController, (MvxModalPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => CloseModalViewController(viewModel, (MvxModalPresentationAttribute)attribute) }); AttributeTypesToActionsDictionary.Add( typeof(MvxSplitViewPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (UIViewController)this.CreateViewControllerFor(request); var splitAttribute = (MvxSplitViewPresentationAttribute)attribute; switch (splitAttribute.Position) { case MasterDetailPosition.Master: ShowMasterSplitViewController(viewController, splitAttribute, request); break; case MasterDetailPosition.Detail: ShowDetailSplitViewController(viewController, splitAttribute, request); break; } }, CloseAction = (viewModel, attribute) => { var splitAttribute = (MvxSplitViewPresentationAttribute)attribute; switch (splitAttribute.Position) { case MasterDetailPosition.Master: return(CloseMasterSplitViewController(viewModel, splitAttribute)); case MasterDetailPosition.Detail: default: return(CloseDetailSplitViewController(viewModel, splitAttribute)); } } }); }
public override void RegisterAttributeTypes() { AttributeTypesToActionsDictionary.Add( typeof(MvxWindowPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (NSViewController)this.CreateViewControllerFor(request); ShowWindowViewController(viewController, (MvxWindowPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => { Close(viewModel); return(true); } }); AttributeTypesToActionsDictionary.Add( typeof(MvxContentPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (NSViewController)this.CreateViewControllerFor(request); ShowContentViewController(viewController, (MvxContentPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => { Close(viewModel); return(true); } }); AttributeTypesToActionsDictionary.Add( typeof(MvxModalPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (NSViewController)this.CreateViewControllerFor(request); ShowModalViewController(viewController, (MvxModalPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => { Close(viewModel); return(true); } }); AttributeTypesToActionsDictionary.Add( typeof(MvxSheetPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (NSViewController)this.CreateViewControllerFor(request); ShowSheetViewController(viewController, (MvxSheetPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => { Close(viewModel); return(true); } }); AttributeTypesToActionsDictionary.Add( typeof(MvxTabPresentationAttribute), new MvxPresentationAttributeAction { ShowAction = (viewType, attribute, request) => { var viewController = (NSViewController)this.CreateViewControllerFor(request); ShowTabViewController(viewController, (MvxTabPresentationAttribute)attribute, request); }, CloseAction = (viewModel, attribute) => { Close(viewModel); return(true); } }); }