ShowWindow() public method

Shows a window for the specified model.
public ShowWindow ( object rootModel, object context = null, object>.IDictionary settings = null ) : void
rootModel object The root model.
context object The context.
settings object>.IDictionary The optional window settings.
return void
Ejemplo n.º 1
0
        /// <summary>
        /// Locates the view model, locates the associate view, binds them and shows it as the root view.
        /// </summary>
        /// <param name="viewModelType">The view model type.</param>
        protected static void DisplayRootViewFor(Type viewModelType)
        {
            IWindowManager windowManager;

            try
            {
                windowManager = IoC.Get <IWindowManager>();
            }
            catch
            {
                windowManager = new WindowManager();
            }

            windowManager.ShowWindow(IoC.GetInstance(viewModelType, null));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Locates the view model, locates the associate view, binds them and shows it as the root view.
        /// </summary>
        /// <param name="viewModelType">The view model type.</param>
        protected static void DisplayRootViewFor(Type viewModelType)
        {
            IWindowManager windowManager;

            try
            {
                windowManager = IoC.Get<IWindowManager>();
            }
            catch
            {
                windowManager = new WindowManager();
            }

            windowManager.ShowWindow(IoC.GetInstance(viewModelType, null));
        }