Beispiel #1
0
 private async void AddCommands(CauldronUICommandCollection commands)
 {
     await this.Dispatcher.RunAsync(() =>
     {
         foreach (var item in commands.Where(x => x != null))
         {
             this.Buttons.Add(new MessageDialogCommandViewModel
             {
                 Text          = item.Label,
                 ButtonCommand = new RelayCommand(() =>
                 {
                     item.Invoke();
                     this.Navigator.TryClose(this);
                 })
             });
         }
     });
 }