public MainViewModel(IperDialogService dialogService) { _dialogService = dialogService; ShowDialogCommand = new perRelayCommandAsync(OnShowDialogAsync, () => SelectedDialogIndex > 0) .ObservesInternalProperty(this, nameof(SelectedDialogIndex)); AllDialogTypes = new List <perValueDisplayPair <int> > { 1.CreateValueDisplayPair("Simple Message Dialog"), 2.CreateValueDisplayPair("Message Dialog with a Choice of Buttons"), 3.CreateValueDisplayPair("Xaml content: Red Circle"), 4.CreateValueDisplayPair("Xaml content: Green Square + Icon") }; }
public MainViewModel(IStaffManagerDataService dataService, IperDialogService dialogService) { _dataService = dataService; _dialogService = dialogService; LoadDataCommand = new perRelayCommandAsync(OnLoadData); AddPersonCommand = new perRelayCommand(OnAddPerson); DeletePersonCommand = new perRelayCommand(OnDeletePerson, () => SelectedPersonVm != null) .ObservesInternalProperty(this, nameof(SelectedPersonVm)); ListSelectedPeopleCommand = new perRelayCommandAsync(OnListSelectedPeople, () => _personVmList.Any()) .ObservesCollection(_personVmList); _departmentVmList.CollectionChanged += (s, e) => RaisePropertyChanged(nameof(DepartmentVmsForCombo)); }
public smEditDialogViewModel(IperDialogService dialogService) { _dialogService = dialogService; CancelCommand = new perRelayCommandAsync(OnCancelAsync); }
public MainViewModel(IperDialogService dialogService) { _dialogService = dialogService; AllResizeModes = perEnumHelper.MakeValueDisplayPairs <ResizeMode>(); ShowMessageDialogCommand = new perRelayCommandAsync(OnShowMessageDialogAsync); }