Example #1
0
 public BarViewModel(BarModel model)
 {
     _model = model;
     _isExpanded = model.IsExpanded;
     _expand = new RelayCommand(p => this.IsExpanded = true, p => !this.IsExpanded);
     _collapse = new RelayCommand(p => this.IsExpanded = false, p => this.IsExpanded);
 }
Example #2
0
 public MainWindowViewModel()
 {
     _barModel = new BarModel();
     _showBar = new RelayCommand(p => this.Bar = new BarViewModel(_barModel), p => null == _bar);
     _hideBar = new RelayCommand(p => this.Bar = null, p => null != _bar);
 }