Example #1
0
 public Vm()
 {
     _buttonInfos = new ObservableCollection<ButtonInfo>
     {
         new ButtonInfo(new RelayCommand(o => MessageBox.Show("1")), "B1"),
         new ButtonInfo(new RelayCommand(o => MessageBox.Show("2")), "B2"),
         new ButtonInfo(new RelayCommand(o => MessageBox.Show("3")), "B3")
     };
     AddItem= new RelayCommand(o=>Add());
 }
Example #2
0
 public ButtonInfo(RelayCommand command, string text)
 {
     Command = command;
     Text = text;
 }