コード例 #1
0
        public static UIViewController CreateViewControllerForTab(this IMvxTouchView view, Type viewModelType, string title, string imageName, string selectedImageName, string badgeValue)
        {
            var viewController = view.CreateViewControllerFor(viewModelType) as UIViewController;

            viewController.SetTitleAndTabBarItem(title, imageName, selectedImageName, badgeValue);

            return(viewController);
        }
コード例 #2
0
 public static IMvxTouchView CreateViewControllerFor <TTargetViewModel>(this IMvxTouchView view,
                                                                        object parameterObject)
     where TTargetViewModel : class, IMvxViewModel
 {
     return
         (view.CreateViewControllerFor <TTargetViewModel>(parameterObject == null
                                                            ? null
                                                            : parameterObject.ToSimplePropertyDictionary()));
 }
コード例 #3
0
        public static IMvxTouchView CreateViewControllerFor <TTargetViewModel>(
            this IMvxTouchView view,
            IDictionary <string, string> parameterValues = null)
            where TTargetViewModel : class, IMvxViewModel
        {
            var parameterBundle = new MvxBundle(parameterValues);
            var request         = new MvxViewModelRequest <TTargetViewModel>(parameterBundle, null,
                                                                             MvxRequestedBy.UserAction);

            return(view.CreateViewControllerFor(request));
        }
コード例 #4
0
        public static IMvxTouchView CreateViewControllerFor <TTargetViewModel>(
            this IMvxTouchView view,
            IDictionary <string, string> parameterValues = null)
            where TTargetViewModel : class, IMvxViewModel
        {
            parameterValues = parameterValues ?? new Dictionary <string, string>();
            var request = new MvxShowViewModelRequest <TTargetViewModel>(parameterValues, false,
                                                                         MvxRequestedBy.UserAction);

            return(view.CreateViewControllerFor <TTargetViewModel>(request));
        }