コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the ViewModelBase class.
 /// </summary>
 /// <param name="viewModelContext">The <see cref="ViewModelContext"/>.</param>
 protected ViewModelBase(IViewModelContext viewModelContext)
 {
     ViewModelContext = viewModelContext;
     Logger           = ViewModelContext.Logger;
     Save             = new ViewModelCommand(OnSave);
     Refresh          = new ViewModelCommand(OnRefresh);
     ClearMessageBox  = new ViewModelCommand(OnClearMessages);
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DocumentViewModel"/> class.
 /// </summary>
 /// <param name="viewModelContext">The view model context.</param>
 protected DocumentViewModel(IViewModelContext viewModelContext)
     : base(viewModelContext)
 {
     navigationHistory = new List <NavigationTarget>();
     NavigateDocument  = new ViewModelCommand(OnNavigateDocument);
 }