|
| bool | IsViewModelOf (object model) |
| | Determines whether the current object is a view model of a particular model object. More...
|
| |
| Window | InjectInto< T > () |
| | Injects the ViewModel into a newly created View and wires the RequestCloseView event. More...
|
| |
| Window | InjectInto (Window view) |
| | Injects the view model into an existing view by setting the view's DataContext. More...
|
| |
| void | InjectAndShowInThread< T > (IntPtr ownerForm) |
| | Creates a new thread that creates a new instance of the view T , sets its Forms owner and shows it modelessly. More...
|
| |
| void | InjectAndShowInThread< T > () |
| | Creates a new thread that creates a new instance of the view T and shows it modelessly. More...
|
| |
| void | InjectAndShowDialogInThread< T > (IntPtr ownerForm) |
| | Creates a new thread that creates a new instance of the view T and shows it as a dialog. More...
|
| |
| abstract object | RevealModelObject () |
| | Returns the model object that this view model wraps or null if there is no wrapped model object. More...
|
| |
|
| | ViewModelBase () |
| | Does not allow public instantiation of this class. More...
|
| |
|
virtual void | OnPropertyChanged (string propertyName) |
| |
|
virtual bool | CanCloseView () |
| |
|
virtual void | DoCloseView () |
| |
| CancellationToken | Dispatch (Action action) |
| | Dispatches an action in the current synchronization context if one exists, or using the Dispatcher. More...
|
| |
|
|
virtual string | DisplayString [get, set] |
| |
|
bool | IsSelected [get, set] |
| |
|
Dispatcher | ViewDispatcher [get, set] |
| |
|
ICommand | CloseViewCommand [get] |
| |
| Dispatcher | Dispatcher [get] |
| | Captures the dispatcher of the thread that the object was created in. More...
|
| |
|
TaskScheduler | SyncContext [get] |
| |
|
| EventHandler | RequestCloseView |
| | Raised by the CloseView Command, signals that associated views are to be closed. More...
|
| |
|
PropertyChangedEventHandler | PropertyChanged |
| |
Definition at line 29 of file ViewModelBase.cs.
| Bovender.Mvvm.ViewModels.ViewModelBase.ViewModelBase |
( |
| ) |
|
|
inlineprotected |
Does not allow public instantiation of this class.
Definition at line 272 of file ViewModelBase.cs.
| CancellationToken Bovender.Mvvm.ViewModels.ViewModelBase.Dispatch |
( |
Action |
action | ) |
|
|
inlineprotected |
Dispatches an action in the current synchronization context if one exists, or using the Dispatcher.
- Parameters
-
Definition at line 321 of file ViewModelBase.cs.
| void Bovender.Mvvm.ViewModels.ViewModelBase.InjectAndShowDialogInThread< T > |
( |
IntPtr |
ownerForm | ) |
|
|
inline |
Creates a new thread that creates a new instance of the view T and shows it as a dialog.
Use this to show dialogs during asynchronous operations.
- Parameters
-
| ownerForm | Handle of the Forms window that the view should belong to. |
- Template Parameters
-
| T | View (descendant of Window). |
Definition at line 189 of file ViewModelBase.cs.
| void Bovender.Mvvm.ViewModels.ViewModelBase.InjectAndShowInThread< T > |
( |
IntPtr |
ownerForm | ) |
|
|
inline |
Creates a new thread that creates a new instance of the view T , sets its Forms owner and shows it modelessly.
Use this to show views during asynchronous operations.
- Parameters
-
| ownerForm | Handle of the Forms window that the view should belong to. |
- Template Parameters
-
| T | View (descendant of Window). |
Definition at line 143 of file ViewModelBase.cs.
| void Bovender.Mvvm.ViewModels.ViewModelBase.InjectAndShowInThread< T > |
( |
| ) |
|
|
inline |
Creates a new thread that creates a new instance of the view T and shows it modelessly.
Use this to show views during asynchronous operations.
- Template Parameters
-
| T | View (descendant of Window). |
Definition at line 177 of file ViewModelBase.cs.
| Window Bovender.Mvvm.ViewModels.ViewModelBase.InjectInto |
( |
Window |
view | ) |
|
|
inline |
Injects the view model into an existing view by setting the view's DataContext.
- Parameters
-
| view | View that shall be dependency injected. |
- Returns
- View with current view model injected.
Definition at line 114 of file ViewModelBase.cs.
Injects the ViewModel into a newly created View and wires the RequestCloseView event.
- Template Parameters
-
| T | View, must be derived from System.Windows.Window |
- Returns
- View with DataContext set to the current ViewModel instance that responds to the RequestCloseView event by closing itself.
Definition at line 102 of file ViewModelBase.cs.
| bool Bovender.Mvvm.ViewModels.ViewModelBase.IsViewModelOf |
( |
object |
model | ) |
|
|
inline |
Determines whether the current object is a view model of a particular model object.
Returns false if either the model or the viewmodel's wrapped model object is null.
- Parameters
-
- Returns
- True if model is wrapped by this; false if not (including null objects).
Definition at line 77 of file ViewModelBase.cs.
| abstract object Bovender.Mvvm.ViewModels.ViewModelBase.RevealModelObject |
( |
| ) |
|
|
pure virtual |
| Dispatcher Bovender.Mvvm.ViewModels.ViewModelBase.Dispatcher |
|
getprotected |
Captures the dispatcher of the thread that the object was created in.
Definition at line 347 of file ViewModelBase.cs.
| EventHandler Bovender.Mvvm.ViewModels.ViewModelBase.RequestCloseView |
Raised by the CloseView Command, signals that associated views are to be closed.
Definition at line 244 of file ViewModelBase.cs.
The documentation for this class was generated from the following file: