Method | Description | |
---|---|---|
CreateViewModel ( System.Windows.Controls.UserControl userControl ) : object |
Creates a view model for the specified view. This uses the view model type specified using a ViewModelAttribute if one is specified, and falls back to convention. The convention locates a type in the same namespace/assembly as the view, with a type name formed by adding the 'Model' or 'ViewModel' suffix to the view's type name.
|
|
GetCurrentViewModel ( |
Gets the model associated with the specified framework element. This will walk up the parent hierarchy to find a model if the specified element does not have a model.
|
|
GetViewModel ( System.Windows.Controls.UserControl userControl ) : object |
Gets the view model instance attached to the specified control.
|
|
SetViewModel ( System.Windows.Controls.UserControl userControl, object value ) : void |
Sets the view model instance attached to the specified control. The view model is also used as the DataContext assigned to the control.
|
|
ViewModelAttribute ( |
Initializes an instance of a ViewModelAttribute.
|
public static CreateViewModel ( System.Windows.Controls.UserControl userControl ) : object | ||
userControl | System.Windows.Controls.UserControl | The control for which the view model must be created. |
return | object |
public static GetCurrentViewModel ( |
||
element | The element to lookup. | |
return | object |
public static GetViewModel ( System.Windows.Controls.UserControl userControl ) : object | ||
userControl | System.Windows.Controls.UserControl | The control to lookup. |
return | object |
public static SetViewModel ( System.Windows.Controls.UserControl userControl, object value ) : void | ||
userControl | System.Windows.Controls.UserControl | The control to associated the view model with. |
value | object | The view model instance. |
return | void |
public ViewModelAttribute ( |
||
viewModelType | The type of the associated view model. | |
return | System |