Method ActiveViewModel
ActiveViewModel<TViewModel>()
Gets the active view model of the specified type, searching from the leaf of the view hierarchy upwards.
Declaration
public TViewModel ActiveViewModel<TViewModel>() where TViewModel : class, IRoutedViewModelBase
Returns
| Type | Description |
|---|---|
| TViewModel |
Type Parameters
| Name | Description |
|---|---|
| TViewModel |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | No active view model of the specified type was found. |