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

            ShowViewModel <T>(presentationBundle: CreateBundleForRequestType(specialRequest));
        }
Exemplo n.º 3
0
        public void ShowViewModel <T>(BaseViewModelParameter parameter = null) where T : MvxViewModel
        {
            AddParameterToCache(typeof(T), parameter);

            base.ShowViewModel <T>();
        }
Exemplo n.º 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));
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }