Files
Prism/e2e/Uno/Playground.Module/Dialogs/NotificationDialogViewModel.cs
Dan Siegel aac688c354 Refactor Uno E2E sample to single-project app model
Migrates the Uno Platform E2E sample application from a multi-project
structure to the recommended single-project architecture.

This update consolidates platform-specific heads into the main
`HelloWorld` project and introduces a new `Playground.Module` to
showcase Prism for Uno.WinUI features like regions, dialogs, and modularity
within the streamlined project setup. It also updates the target framework to .NET 10.
2026-05-14 08:46:23 -06:00

40 lines
995 B
C#

namespace Playground.Module.Dialogs;
internal class NotificationDialogViewModel : BindableBase, IDialogAware
{
public NotificationDialogViewModel()
{
CloseCommand = new DelegateCommand(() => RequestClose.Invoke(new DialogResult(ButtonResult.OK)));
}
private string _title = string.Empty;
public string Title
{
get => _title;
set => SetProperty(ref _title, value);
}
private string _message = string.Empty;
public string Message
{
get => _message;
set => SetProperty(ref _message, value);
}
public DelegateCommand CloseCommand { get; }
public DialogCloseListener RequestClose { get; set; }
public bool CanCloseDialog() => true;
public void OnDialogClosed()
{
}
public void OnDialogOpened(IDialogParameters parameters)
{
Title = parameters.GetValue<string>("title") ?? string.Empty;
Message = parameters.GetValue<string>("message") ?? string.Empty;
}
}