Submit big changes related with Material.Dialog
This commit is contained in:
@@ -1,29 +1,12 @@
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Threading;
|
||||
using Material.Dialog.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Material.Dialog.Views;
|
||||
|
||||
namespace Material.Dialog.ViewModels
|
||||
{
|
||||
public class AlertDialogViewModel : DialogWindowViewModel
|
||||
{
|
||||
private AlertDialog _window;
|
||||
|
||||
|
||||
public AlertDialogViewModel(AlertDialog dialog)
|
||||
{
|
||||
_window = dialog;
|
||||
}
|
||||
|
||||
public async void ButtonClick (string param)
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
_window.Result = new DialogResult(param);
|
||||
_window.Close();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user