WindowAwareViewModel class¶
Base class for view models that are shown in a window of their own by IWindowService or IDialogService. It tracks the window the view model is attached to, closes it on request, and creates the view declared by ViewLocatorAttribute.
Public Members¶
| name | description |
|---|---|
| WindowAwareViewModel() | Initializes a new instance of the WindowAwareViewModel class with an empty window caption. |
| WindowAwareViewModel(…) | Initializes a new instance of the WindowAwareViewModel class with the given window caption. |
| Content { get; set; } | |
| IsVisible { get; } | |
| Title { get; set; } | |
| WindowStyleClasses { get; set; } |
Remarks¶
Derived classes override AttachCore and DetachCore to react to the window opening and closing, and CanCloseWindow to veto a close.