IWindowAwareViewModel interface¶
Implemented by view models that are shown in a window of their own. The window services call Attach before showing the window and Detach after it closes, which lets the view model observe its window without depending on any window type.
Members¶
| name | description |
|---|---|
| Content { get; } | The object shown in the window body. This is typically a nested view model or a view instance resolved from ViewLocatorAttribute, but plain text works as well. |
| IsVisible { get; } | true while the view model is attached to an open window. |
| Title { get; } | The window caption, used when the caller does not supply one explicitly. |
| Attach(…) | Associates the view model with the window that is about to show it. Called by the window services before the window becomes visible. |
| Detach() | Releases the association established by Attach. Called by the window services once the window has closed, including when the user closed it through the caption button. |