/// <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); }
/// <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); }