public AddFeedDialog(RSSListFrameViewModel RSSListFrameViewModel) { InitializeComponent(); DataContext = new AddFeedDialogViewModel(RSSListFrameViewModel, new Action(() => { this.Close(); })); }
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(); }); }