Beispiel #1
0
        /// <summary>
        /// Method to invoke when the ShowWindowLogicInViewBase command is executed.
        /// </summary>
        private void OnShowWindowLogicInViewBaseExecute()
        {
            _uiVisualizerService.Unregister(typeof(DemoWindowViewModel));
            _uiVisualizerService.Register(typeof(DemoWindowViewModel), typeof(Views.LogicInViewBase.DemoWindow));

            var typeFactory = TypeFactory.Default;
            var vm          = typeFactory.CreateInstance <DemoWindowViewModel>();

            _uiVisualizerService.ShowDialog(vm);
        }
Beispiel #2
0
        /// <summary>
        /// This unregisters the specified view model.
        /// </summary>
        /// <param name="uiVisualizerService">The UI visualizer service.</param>
        /// <param name="viewModelType">Type of the view model to unregister.</param>
        /// <returns><c>true</c> if the view model is unregistered; otherwise <c>false</c>.</returns>
        public static bool Unregister(this IUIVisualizerService uiVisualizerService, Type viewModelType)
        {
            Argument.IsNotNull("viewModelType", viewModelType);

            return(uiVisualizerService.Unregister(viewModelType.FullName));
        }