Пример #1
0
 private static void AddParameterToCache(Type viewModelType, BaseViewModelParameter parameter)
 {
     if (parameter != null)
     {
         MemoryCache[viewModelType.Name] = parameter;
     }
 }
Пример #2
0
        public void MyShowViewModel <T>(RequestType specialRequest, BaseViewModelParameter parameter = null) where T : MvxViewModel
        {
            AddParameterToCache(typeof(T), parameter);

            ShowViewModel <T>(presentationBundle: CreateBundleForRequestType(specialRequest));
        }
Пример #3
0
        public void ShowViewModel <T>(BaseViewModelParameter parameter = null) where T : MvxViewModel
        {
            AddParameterToCache(typeof(T), parameter);

            base.ShowViewModel <T>();
        }
Пример #4
0
        /// <summary>
        ///     Shows the view modal modally and creates a new navigations tack for the modal view
        /// </summary>
        /// <param name="viewModelType"></param>
        public void ShowModalViewModel(Type viewModelType, BaseViewModelParameter parameter = null)
        {
            AddParameterToCache(viewModelType, parameter);

            ShowViewModel(viewModelType, presentationBundle: CreateBundleForRequestType(RequestType.Modal));
        }
Пример #5
0
 /// <summary>
 ///     Tries to show the view model in the current navigation stack
 /// </summary>
 /// <typeparam name="T"></typeparam>
 public void ShowModalViewModel <T>(BaseViewModelParameter parameter = null) where T : MvxViewModel
 {
     ShowModalViewModel(typeof(T), parameter);
 }
Пример #6
0
 /// <summary>
 ///     Shows the view model after cleaning the master detail navigation stack back to the root (home)
 /// </summary>
 /// <typeparam name="T"></typeparam>
 public void ShowAsCleanViewModel <T>(BaseViewModelParameter parameter = null) where T : MvxViewModel
 {
     ShowViewModel <T>(RequestType.Clean, parameter);
 }
Пример #7
0
 /// <summary>
 ///     Shows the view model as the root of the master detail page
 /// </summary>
 /// <typeparam name="T"></typeparam>
 public void ShowAsRootViewModel <T>(BaseViewModelParameter parameter = null) where T : MvxViewModel
 {
     ShowViewModel <T>(RequestType.Root, parameter);
 }