-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDialogExtensions.cs
More file actions
26 lines (22 loc) · 843 Bytes
/
Copy pathDialogExtensions.cs
File metadata and controls
26 lines (22 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System.Collections.Specialized;
using System.ComponentModel;
using System.Threading.Tasks;
using HanumanInstitute.MvvmDialogs;
using HanumanInstitute.MvvmDialogs.Avalonia.DialogHost;
using HanumanInstitute.Validators;
using RssReader.ViewModels;
namespace RssReader;
public static class DialogExtensions
{
public static async Task ShowAddChannelDialogAsync(this IDialogService dialogService, INotifyPropertyChanged ownerViewModel)
{
dialogService.CheckNotNull(nameof(dialogService));
var viewModel = dialogService.CreateViewModel<AddChannelDialogViewModel>();
var settings = new DialogHostSettings()
{
Content = viewModel,
CloseOnClickAway = true
};
var result = await dialogService.ShowDialogHostAsync(ownerViewModel, settings);
}
}