Пример #1
0
 public AddFeedDialog(RSSListFrameViewModel RSSListFrameViewModel)
 {
     InitializeComponent();
     DataContext = new AddFeedDialogViewModel(RSSListFrameViewModel, new Action(() =>
     {
         this.Close();
     }));
 }
Пример #2
0
 public AddFeedDialogViewModel(RSSListFrameViewModel RSSListFrameViewModel, Action closeAction)
 {
     _vm                = RSSListFrameViewModel;
     _closeAction       = closeAction;
     CloseDialogCommand = new RelayCommand <object>(x =>
     {
         if (x is string)
         {
             _vm?.AddFeed(x as string);
         }
         _closeAction?.Invoke();
     });
 }