C# Class Caliburn.Micro.WindowManager

A service that manages windows.
Inheritance: IWindowManager
Afficher le fichier Open project: dbuksbaum/Learning-Caliburn.Micro Class Usage Examples

Méthodes publiques

Méthode Description
GetSignificantView ( DependencyObject view ) : DependencyObject

Used to retrieve the root, non-framework-created view.

In certain instances the WindowManager creates UI elements in order to display windows. For example, if you ask the window manager to show a UserControl as a dialog, it creates a window to host the UserControl in. The WindowManager marks that element as a framework-created element so that it can determine what it created vs. what was intended by the developer. Calling GetSignificantView allows the framework to discover what the original element was.

Show ( object rootModel, object context = null ) : void

Shows a window for the specified model.

ShowDialog ( object rootModel, object context = null ) : bool?

Shows a modal dialog for the specified model.

ShowDialog ( object rootModel, object context = null ) : void

Shows a modal dialog for the specified model.

Private Methods

Méthode Description
CreateWindow ( object rootModel, bool isDialog, object context ) : Window
EnsureWindow ( object model, object view ) : System.Windows.Controls.ChildWindow
EnsureWindow ( object model, object view, bool isDialog ) : Window
OnShutdownAttempted ( IGuardClose guard, System.Windows.Controls.ChildWindow view, CancelEventArgs e ) : void
OnShutdownAttempted ( IGuardClose guard, Window view, CancelEventArgs e ) : void

Method Details

GetSignificantView() public static méthode

Used to retrieve the root, non-framework-created view.
In certain instances the WindowManager creates UI elements in order to display windows. For example, if you ask the window manager to show a UserControl as a dialog, it creates a window to host the UserControl in. The WindowManager marks that element as a framework-created element so that it can determine what it created vs. what was intended by the developer. Calling GetSignificantView allows the framework to discover what the original element was.
public static GetSignificantView ( DependencyObject view ) : DependencyObject
view System.Windows.DependencyObject The view to search.
Résultat System.Windows.DependencyObject

Show() public méthode

Shows a window for the specified model.
public Show ( object rootModel, object context = null ) : void
rootModel object The root model.
context object The context.
Résultat void

ShowDialog() public méthode

Shows a modal dialog for the specified model.
public ShowDialog ( object rootModel, object context = null ) : bool?
rootModel object The root model.
context object The context.
Résultat bool?

ShowDialog() public méthode

Shows a modal dialog for the specified model.
public ShowDialog ( object rootModel, object context = null ) : void
rootModel object The root model.
context object The context.
Résultat void