diff --git a/Directory.Packages.props b/Directory.Packages.props
index be9aba98a4..73aa56f0cb 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -15,40 +15,41 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
@@ -81,4 +82,4 @@
-
+
\ No newline at end of file
diff --git a/e2e/Uno/HelloWorld.Mobile/HelloWorld.Mobile.csproj b/e2e/Uno/HelloWorld.Mobile/HelloWorld.Mobile.csproj
index cbe4836118..1b7a14f2fc 100644
--- a/e2e/Uno/HelloWorld.Mobile/HelloWorld.Mobile.csproj
+++ b/e2e/Uno/HelloWorld.Mobile/HelloWorld.Mobile.csproj
@@ -21,7 +21,7 @@
-
+
diff --git a/e2e/Uno/HelloWorld.Skia.Gtk/HelloWorld.Skia.Gtk.csproj b/e2e/Uno/HelloWorld.Skia.Gtk/HelloWorld.Skia.Gtk.csproj
index cf28b6c112..5c4d30078e 100644
--- a/e2e/Uno/HelloWorld.Skia.Gtk/HelloWorld.Skia.Gtk.csproj
+++ b/e2e/Uno/HelloWorld.Skia.Gtk/HelloWorld.Skia.Gtk.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/e2e/Uno/HelloWorld.Skia.Linux.FrameBuffer/HelloWorld.Skia.Linux.FrameBuffer.csproj b/e2e/Uno/HelloWorld.Skia.Linux.FrameBuffer/HelloWorld.Skia.Linux.FrameBuffer.csproj
index a2669a7004..d8efd94043 100644
--- a/e2e/Uno/HelloWorld.Skia.Linux.FrameBuffer/HelloWorld.Skia.Linux.FrameBuffer.csproj
+++ b/e2e/Uno/HelloWorld.Skia.Linux.FrameBuffer/HelloWorld.Skia.Linux.FrameBuffer.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/e2e/Uno/HelloWorld.Skia.WPF/HelloWorld.Skia.WPF.csproj b/e2e/Uno/HelloWorld.Skia.WPF/HelloWorld.Skia.WPF.csproj
index 6d677cab14..32cff4f35d 100644
--- a/e2e/Uno/HelloWorld.Skia.WPF/HelloWorld.Skia.WPF.csproj
+++ b/e2e/Uno/HelloWorld.Skia.WPF/HelloWorld.Skia.WPF.csproj
@@ -21,7 +21,7 @@
-
+
diff --git a/e2e/Uno/HelloWorld.Wasm/HelloWorld.Wasm.csproj b/e2e/Uno/HelloWorld.Wasm/HelloWorld.Wasm.csproj
index a37b18b10e..037a9a1e85 100644
--- a/e2e/Uno/HelloWorld.Wasm/HelloWorld.Wasm.csproj
+++ b/e2e/Uno/HelloWorld.Wasm/HelloWorld.Wasm.csproj
@@ -47,7 +47,7 @@
-
+
diff --git a/e2e/Uno/HelloWorld.Windows/HelloWorld.Windows.csproj b/e2e/Uno/HelloWorld.Windows/HelloWorld.Windows.csproj
index 493980fea5..7f0891707a 100644
--- a/e2e/Uno/HelloWorld.Windows/HelloWorld.Windows.csproj
+++ b/e2e/Uno/HelloWorld.Windows/HelloWorld.Windows.csproj
@@ -1,7 +1,7 @@
WinExe
- net7.0-windows10.0.19041.0
+ net7.0-windows10.0.22621.0
10.0.18362.0
UnoWinUIQuickStart
x86;x64;arm64
@@ -54,7 +54,7 @@
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->
-
-
+
+
diff --git a/e2e/Uno/HelloWorld/HelloWorld.csproj b/e2e/Uno/HelloWorld/HelloWorld.csproj
index 680391199b..0fdb105213 100644
--- a/e2e/Uno/HelloWorld/HelloWorld.csproj
+++ b/e2e/Uno/HelloWorld/HelloWorld.csproj
@@ -2,7 +2,7 @@
net7.0;net7.0-ios;net7.0-android;net7.0-maccatalyst
- $(TargetFrameworks);net7.0-windows10.0.19041
+ $(TargetFrameworks);net7.0-windows10.0.22621
true
@@ -38,8 +38,8 @@
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->
-
-
+
+
diff --git a/e2e/Uno/ModuleA/Dialogs/AlertDialog.xaml b/e2e/Uno/ModuleA/Dialogs/AlertDialog.xaml
new file mode 100644
index 0000000000..b555d1ca31
--- /dev/null
+++ b/e2e/Uno/ModuleA/Dialogs/AlertDialog.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/e2e/Uno/ModuleA/Dialogs/AlertDialog.xaml.cs b/e2e/Uno/ModuleA/Dialogs/AlertDialog.xaml.cs
new file mode 100644
index 0000000000..1eef446724
--- /dev/null
+++ b/e2e/Uno/ModuleA/Dialogs/AlertDialog.xaml.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
+
+namespace ModuleA.Dialogs
+{
+ public sealed partial class AlertDialog : UserControl
+ {
+ public AlertDialog()
+ {
+ this.InitializeComponent();
+ }
+ }
+}
diff --git a/e2e/Uno/ModuleA/Dialogs/AlertDialogViewModel.cs b/e2e/Uno/ModuleA/Dialogs/AlertDialogViewModel.cs
new file mode 100644
index 0000000000..4a9f43d844
--- /dev/null
+++ b/e2e/Uno/ModuleA/Dialogs/AlertDialogViewModel.cs
@@ -0,0 +1,40 @@
+namespace ModuleA.Dialogs;
+
+internal class AlertDialogViewModel : BindableBase, IDialogAware
+{
+ public AlertDialogViewModel()
+ {
+ 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; }
+
+ public bool CanCloseDialog() => true;
+
+ public void OnDialogClosed()
+ {
+
+ }
+
+ public void OnDialogOpened(IDialogParameters parameters)
+ {
+ Title = parameters.GetValue("title");
+ Message = parameters.GetValue("message");
+ }
+}
diff --git a/e2e/Uno/ModuleA/ModuleA.csproj b/e2e/Uno/ModuleA/ModuleA.csproj
index 196362b971..e2ff10b189 100644
--- a/e2e/Uno/ModuleA/ModuleA.csproj
+++ b/e2e/Uno/ModuleA/ModuleA.csproj
@@ -2,7 +2,7 @@
net7.0;net7.0-ios;net7.0-android;net7.0-maccatalyst
- $(TargetFrameworks);net7.0-windows10.0.19041
+ $(TargetFrameworks);net7.0-windows10.0.22621
true
@@ -32,8 +32,8 @@
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->
-
-
+
+
diff --git a/e2e/Uno/ModuleA/ModuleAModule.cs b/e2e/Uno/ModuleA/ModuleAModule.cs
index 974ecbca9d..19bf88bc90 100644
--- a/e2e/Uno/ModuleA/ModuleAModule.cs
+++ b/e2e/Uno/ModuleA/ModuleAModule.cs
@@ -1,4 +1,6 @@
+using ModuleA.Dialogs;
using ModuleA.Views;
+using AlertDialog = ModuleA.Dialogs.AlertDialog;
namespace ModuleA;
@@ -15,6 +17,7 @@ public void RegisterTypes(IContainerRegistry containerRegistry)
{
containerRegistry.RegisterForNavigation();
containerRegistry.RegisterForNavigation();
+ containerRegistry.RegisterDialog();
}
public void OnInitialized(IContainerProvider containerProvider)
diff --git a/e2e/Uno/ModuleA/ViewModels/ViewAViewModel.cs b/e2e/Uno/ModuleA/ViewModels/ViewAViewModel.cs
new file mode 100644
index 0000000000..f2fb0beb07
--- /dev/null
+++ b/e2e/Uno/ModuleA/ViewModels/ViewAViewModel.cs
@@ -0,0 +1,26 @@
+using System.Windows.Input;
+
+namespace ModuleA.ViewModels;
+
+internal class ViewAViewModel : ViewModelBase
+{
+ private readonly IDialogService _dialogService;
+
+ public ViewAViewModel(IRegionManager regionManager, IDialogService dialogService)
+ : base(regionManager)
+ {
+ _dialogService = dialogService;
+ ShowAlertCommand = new DelegateCommand(ShowDialog);
+ }
+
+ public ICommand ShowAlertCommand { get; }
+
+ private void ShowDialog()
+ {
+ _dialogService.ShowDialog("AlertDialog", new DialogParameters
+ {
+ { "title", "Oh Snap" },
+ { "message", "You can actually create much more amazing dialogs with Prism. Hello from ViewA!" }
+ });
+ }
+}
diff --git a/e2e/Uno/ModuleA/ViewModels/ViewBViewModel.cs b/e2e/Uno/ModuleA/ViewModels/ViewBViewModel.cs
new file mode 100644
index 0000000000..54e6390751
--- /dev/null
+++ b/e2e/Uno/ModuleA/ViewModels/ViewBViewModel.cs
@@ -0,0 +1,9 @@
+namespace ModuleA.ViewModels;
+
+internal class ViewBViewModel : ViewModelBase
+{
+ public ViewBViewModel(IRegionManager regionManager)
+ : base(regionManager)
+ {
+ }
+}
diff --git a/e2e/Uno/ModuleA/ViewModels/ViewModelBase.cs b/e2e/Uno/ModuleA/ViewModels/ViewModelBase.cs
new file mode 100644
index 0000000000..e7224c0796
--- /dev/null
+++ b/e2e/Uno/ModuleA/ViewModels/ViewModelBase.cs
@@ -0,0 +1,44 @@
+using System.Collections.ObjectModel;
+
+namespace ModuleA.ViewModels;
+
+internal class ViewModelBase : BindableBase, IRegionAware
+{
+ private readonly string _name;
+ protected IRegionManager RegionManager { get; }
+
+ protected ViewModelBase(IRegionManager regionManager)
+ {
+ RegionManager = regionManager;
+ Title = _name = GetType().Name.Replace("ViewModel", string.Empty);
+ }
+
+ private string _title = string.Empty;
+ public string Title
+ {
+ get => _title;
+ set => SetProperty(ref _title, value);
+ }
+
+ private ObservableCollection _messages = new();
+ public IEnumerable Messages => _messages;
+
+
+ public bool IsNavigationTarget(NavigationContext navigationContext) =>
+ navigationContext.NavigatedName() == _name;
+
+ public void OnNavigatedFrom(NavigationContext navigationContext)
+ {
+ _messages.Add("OnNavigatedFrom");
+ }
+
+ public void OnNavigatedTo(NavigationContext navigationContext)
+ {
+ if (navigationContext.Parameters.TryGetValue("title", out string title))
+ {
+ Title = title;
+ }
+
+ _messages.Add("OnNavigatedTo");
+ }
+}
diff --git a/e2e/Uno/ModuleA/Views/ViewA.xaml b/e2e/Uno/ModuleA/Views/ViewA.xaml
index 3d8d9159b5..781b8de8f3 100644
--- a/e2e/Uno/ModuleA/Views/ViewA.xaml
+++ b/e2e/Uno/ModuleA/Views/ViewA.xaml
@@ -9,7 +9,8 @@
d:DesignHeight="300"
d:DesignWidth="400">
-
+
-
+
+
diff --git a/src/Uno/Prism.DryIoc.Uno/Prism.DryIoc.Uno.WinUI.csproj b/src/Uno/Prism.DryIoc.Uno/Prism.DryIoc.Uno.WinUI.csproj
index 6138be3a48..7fc66e4285 100644
--- a/src/Uno/Prism.DryIoc.Uno/Prism.DryIoc.Uno.WinUI.csproj
+++ b/src/Uno/Prism.DryIoc.Uno/Prism.DryIoc.Uno.WinUI.csproj
@@ -2,7 +2,7 @@
net7.0;net7.0-android;net7.0-ios;net7.0-maccatalyst;net7.0-macos
- $(TargetFrameworks);net6.0-windows10.0.18362;net7.0-windows10.0.18362
+ $(TargetFrameworks);net7.0-windows10.0.19041
$(NoWarn);1591
Prism.DryIoc.Uno
Prism.DryIoc.Uno.WinUI
diff --git a/src/Uno/Prism.Uno/Prism.Uno.WinUI.csproj b/src/Uno/Prism.Uno/Prism.Uno.WinUI.csproj
index 05a2d5153e..d86277fbe8 100644
--- a/src/Uno/Prism.Uno/Prism.Uno.WinUI.csproj
+++ b/src/Uno/Prism.Uno/Prism.Uno.WinUI.csproj
@@ -2,7 +2,7 @@
net7.0;net7.0-android;net7.0-ios;net7.0-maccatalyst;net7.0-macos
- $(TargetFrameworks);net6.0-windows10.0.18362;net7.0-windows10.0.18362
+ $(TargetFrameworks);net7.0-windows10.0.19041
true
Prism.Uno
Prism
diff --git a/src/Wpf/Prism.Wpf/Dialogs/IDialogServiceCompatExtensions.cs b/src/Wpf/Prism.Wpf/Dialogs/IDialogServiceCompatExtensions.cs
index 5c0be5937d..0171737c45 100644
--- a/src/Wpf/Prism.Wpf/Dialogs/IDialogServiceCompatExtensions.cs
+++ b/src/Wpf/Prism.Wpf/Dialogs/IDialogServiceCompatExtensions.cs
@@ -72,43 +72,5 @@ private static IDialogParameters EnsureShowNonModalParameter(IDialogParameters p
return parameters;
}
#endif
- ///
- /// Shows a modal dialog.
- ///
- /// The DialogService
- /// The name of the dialog to show.
- public static void ShowDialog(this IDialogService dialogService, string name)
- {
- dialogService.ShowDialog(name, new DialogParameters(), DialogCallback.Empty);
- }
-
- ///
- /// Shows a modal dialog.
- ///
- /// The DialogService
- /// The name of the dialog to show.
- /// The action to perform when the dialog is closed.
- public static void ShowDialog(this IDialogService dialogService, string name, Action callback)
- {
- dialogService.ShowDialog(name, new DialogParameters(), new DialogCallback().OnClose(callback));
- }
-
- ///
- /// Shows a modal dialog.
- ///
- /// The DialogService
- /// The name of the dialog to show.
- /// The parameters to pass to the dialog.
- /// The action to perform when the dialog is closed.
- /// The name of the hosting window registered with the IContainerRegistry.
- public static void ShowDialog(this IDialogService dialogService, string name, IDialogParameters parameters, Action callback, string windowName)
- {
- parameters ??= new DialogParameters();
-
- if (!string.IsNullOrEmpty(windowName))
- parameters.Add(KnownDialogParameters.WindowName, windowName);
-
- dialogService.ShowDialog(name, parameters, new DialogCallback().OnClose(callback));
- }
}
}