diff --git a/Sandbox/Wpf/HelloWorld/HelloWorld.sln b/Sandbox/Wpf/HelloWorld/HelloWorld.sln
index 14a48df6c..406bcc12f 100644
--- a/Sandbox/Wpf/HelloWorld/HelloWorld.sln
+++ b/Sandbox/Wpf/HelloWorld/HelloWorld.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.27703.2042
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.28729.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorld", "HelloWorld\HelloWorld.csproj", "{B03C14CC-8DE9-40EE-9562-12B976E4CEE8}"
EndProject
@@ -11,8 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Prism Library", "Prism Libr
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Wpf", "..\..\..\Source\Wpf\Prism.Wpf\Prism.Wpf.csproj", "{AA8ED3D6-A708-4187-8FAC-00F56E063AD7}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Ninject.Wpf", "..\..\..\Source\Wpf\Prism.Ninject.Wpf\Prism.Ninject.Wpf.csproj", "{5263604A-39EC-4E7B-82DD-8F52C838A77A}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.DryIoc.Wpf", "..\..\..\Source\Wpf\Prism.DryIoc.Wpf\Prism.DryIoc.Wpf.csproj", "{A0842858-BFD5-41AE-BDE7-CBD870BC9900}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Unity.Wpf", "..\..\..\Source\Wpf\Prism.Unity.Wpf\Prism.Unity.Wpf.csproj", "{DEBADAAB-5C78-444E-AA77-336A43B49EC3}"
@@ -35,10 +33,6 @@ Global
{AA8ED3D6-A708-4187-8FAC-00F56E063AD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA8ED3D6-A708-4187-8FAC-00F56E063AD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA8ED3D6-A708-4187-8FAC-00F56E063AD7}.Release|Any CPU.Build.0 = Release|Any CPU
- {5263604A-39EC-4E7B-82DD-8F52C838A77A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5263604A-39EC-4E7B-82DD-8F52C838A77A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5263604A-39EC-4E7B-82DD-8F52C838A77A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5263604A-39EC-4E7B-82DD-8F52C838A77A}.Release|Any CPU.Build.0 = Release|Any CPU
{A0842858-BFD5-41AE-BDE7-CBD870BC9900}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0842858-BFD5-41AE-BDE7-CBD870BC9900}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0842858-BFD5-41AE-BDE7-CBD870BC9900}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -54,7 +48,6 @@ Global
GlobalSection(NestedProjects) = preSolution
{457AA668-72BB-4701-9A4E-FA86B0C412DE} = {15CF1FE1-D78E-4E3D-A9F8-FA0FCC56A83A}
{AA8ED3D6-A708-4187-8FAC-00F56E063AD7} = {15CF1FE1-D78E-4E3D-A9F8-FA0FCC56A83A}
- {5263604A-39EC-4E7B-82DD-8F52C838A77A} = {15CF1FE1-D78E-4E3D-A9F8-FA0FCC56A83A}
{A0842858-BFD5-41AE-BDE7-CBD870BC9900} = {15CF1FE1-D78E-4E3D-A9F8-FA0FCC56A83A}
{DEBADAAB-5C78-444E-AA77-336A43B49EC3} = {15CF1FE1-D78E-4E3D-A9F8-FA0FCC56A83A}
EndGlobalSection
diff --git a/Sandbox/Wpf/HelloWorld/HelloWorld/Dialogs/ConfirmationDialog.xaml b/Sandbox/Wpf/HelloWorld/HelloWorld/Dialogs/ConfirmationDialog.xaml
index 2e2155317..5c1473361 100644
--- a/Sandbox/Wpf/HelloWorld/HelloWorld/Dialogs/ConfirmationDialog.xaml
+++ b/Sandbox/Wpf/HelloWorld/HelloWorld/Dialogs/ConfirmationDialog.xaml
@@ -5,14 +5,15 @@
prism:ViewModelLocator.AutoWireViewModel="True"
Width="300" Height="150">
-
+
-
-
+
+
diff --git a/Source/Wpf/Prism.DryIoc.Wpf/Legacy/DryIocBootstrapper.cs b/Source/Wpf/Prism.DryIoc.Wpf/Legacy/DryIocBootstrapper.cs
index 0970de6f7..23cfce005 100644
--- a/Source/Wpf/Prism.DryIoc.Wpf/Legacy/DryIocBootstrapper.cs
+++ b/Source/Wpf/Prism.DryIoc.Wpf/Legacy/DryIocBootstrapper.cs
@@ -154,7 +154,7 @@ protected virtual void ConfigureContainer()
if (_useDefaultConfiguration)
{
RegisterTypeIfMissing(true);
- RegisterTypeIfMissing(false);
+ RegisterTypeIfMissing(false);
RegisterTypeIfMissing(true);
RegisterTypeIfMissing(true);
diff --git a/Source/Wpf/Prism.Ninject.Wpf/Legacy/NinjectBootstrapper.cs b/Source/Wpf/Prism.Ninject.Wpf/Legacy/NinjectBootstrapper.cs
index d56d30794..44d092293 100644
--- a/Source/Wpf/Prism.Ninject.Wpf/Legacy/NinjectBootstrapper.cs
+++ b/Source/Wpf/Prism.Ninject.Wpf/Legacy/NinjectBootstrapper.cs
@@ -167,7 +167,7 @@ protected virtual void ConfigureKernel()
if (this.useDefaultConfiguration)
{
this.Kernel.RegisterTypeIfMissing(true);
- this.Kernel.RegisterTypeIfMissing(false);
+ this.Kernel.RegisterTypeIfMissing(false);
this.Kernel.RegisterTypeIfMissing(true);
this.Kernel.RegisterTypeIfMissing(true);
diff --git a/Source/Wpf/Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs b/Source/Wpf/Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs
index 2483b07ef..188f63beb 100644
--- a/Source/Wpf/Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs
+++ b/Source/Wpf/Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs
@@ -150,7 +150,7 @@ protected virtual void ConfigureContainer()
if (useDefaultConfiguration)
{
RegisterTypeIfMissing(typeof(IDialogService), typeof(DialogService), true);
- RegisterTypeIfMissing(typeof(IDialogWindow), typeof(Services.Dialogs.DefaultDialogs.DialogWindow), false);
+ RegisterTypeIfMissing(typeof(IDialogWindow), typeof(DialogWindow), false);
RegisterTypeIfMissing(typeof(IServiceLocator), typeof(UnityServiceLocatorAdapter), true);
RegisterTypeIfMissing(typeof(IModuleInitializer), typeof(ModuleInitializer), true);
diff --git a/Source/Wpf/Prism.Wpf/Prism.Wpf.csproj b/Source/Wpf/Prism.Wpf/Prism.Wpf.csproj
index f1b876527..060c4b52d 100644
--- a/Source/Wpf/Prism.Wpf/Prism.Wpf.csproj
+++ b/Source/Wpf/Prism.Wpf/Prism.Wpf.csproj
@@ -14,6 +14,10 @@ Prism.Wpf helps you more easily design and build rich, flexible, and easy to mai
$(PRISM_WPF_VERSION)
+
+
+
+
diff --git a/Source/Wpf/Prism.Wpf/PrismApplicationBase.cs b/Source/Wpf/Prism.Wpf/PrismApplicationBase.cs
index c8093e082..f8850a9b1 100644
--- a/Source/Wpf/Prism.Wpf/PrismApplicationBase.cs
+++ b/Source/Wpf/Prism.Wpf/PrismApplicationBase.cs
@@ -129,7 +129,7 @@ protected virtual void RegisterRequiredTypes(IContainerRegistry containerRegistr
containerRegistry.Register();
containerRegistry.Register();
containerRegistry.Register();
- containerRegistry.Register(); //default dialog host
+ containerRegistry.Register(); //default dialog host
}
///
diff --git a/Source/Wpf/Prism.Wpf/Services/Dialogs/Dialog.cs b/Source/Wpf/Prism.Wpf/Services/Dialogs/Dialog.cs
new file mode 100644
index 000000000..5b5c11667
--- /dev/null
+++ b/Source/Wpf/Prism.Wpf/Services/Dialogs/Dialog.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Windows;
+
+namespace Prism.Services.Dialogs
+{
+ public class Dialog
+ {
+ public static readonly DependencyProperty WindowStyleProperty =
+ DependencyProperty.RegisterAttached("WindowStyle", typeof(Style), typeof(Dialog), new PropertyMetadata(null));
+
+ public static Style GetWindowStyle(DependencyObject obj)
+ {
+ return (Style)obj.GetValue(WindowStyleProperty);
+ }
+
+ public static void SetWindowStyle(DependencyObject obj, Style value)
+ {
+ obj.SetValue(WindowStyleProperty, value);
+ }
+
+ public static readonly DependencyProperty WindowStartupLocationProperty =
+ DependencyProperty.RegisterAttached("WindowStartupLocation", typeof(WindowStartupLocation), typeof(Dialog), new UIPropertyMetadata(WindowStartupLocation.CenterOwner, OnWindowStartupLocationChanged));
+
+ public static WindowStartupLocation GetWindowStartupLocation(DependencyObject obj)
+ {
+ return (WindowStartupLocation)obj.GetValue(WindowStartupLocationProperty);
+ }
+
+ public static void SetWindowStartupLocation(DependencyObject obj, WindowStartupLocation value)
+ {
+ obj.SetValue(WindowStartupLocationProperty, value);
+ }
+
+ private static void OnWindowStartupLocationChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
+ {
+ if (sender is Window window)
+ window.WindowStartupLocation = (WindowStartupLocation)e.NewValue;
+ }
+ }
+}
diff --git a/Source/Wpf/Prism.Wpf/Services/Dialogs/DialogService.cs b/Source/Wpf/Prism.Wpf/Services/Dialogs/DialogService.cs
index 8d4121124..bd5bd4a5b 100644
--- a/Source/Wpf/Prism.Wpf/Services/Dialogs/DialogService.cs
+++ b/Source/Wpf/Prism.Wpf/Services/Dialogs/DialogService.cs
@@ -11,19 +11,6 @@ public class DialogService : IDialogService
{
private readonly IContainerExtension _containerExtension;
- public static readonly DependencyProperty DialogWindowStyleProperty =
- DependencyProperty.RegisterAttached("DialogWindowStyle", typeof(Style), typeof(DialogService), new PropertyMetadata(null));
-
- public static Style GetDialogWindowStyle(DependencyObject obj)
- {
- return (Style)obj.GetValue(DialogWindowStyleProperty);
- }
-
- public static void SetDialogWindowStyle(DependencyObject obj, Style value)
- {
- obj.SetValue(DialogWindowStyleProperty, value);
- }
-
public DialogService(IContainerExtension containerExtension)
{
_containerExtension = containerExtension;
@@ -119,7 +106,7 @@ void ConfigureDialogWindowEvents(IDialogWindow dialogWindow, Action().FirstOrDefault(x => x.IsActive);
-
- //TODO: is the a good way to control the WindowStartupPosition (not a dependency property and can't be set in a style)
}
}
}
diff --git a/Source/Wpf/Prism.Wpf/Services/Dialogs/DefaultDialogs/DialogWindow.xaml b/Source/Wpf/Prism.Wpf/Services/Dialogs/DialogWindow.xaml
similarity index 84%
rename from Source/Wpf/Prism.Wpf/Services/Dialogs/DefaultDialogs/DialogWindow.xaml
rename to Source/Wpf/Prism.Wpf/Services/Dialogs/DialogWindow.xaml
index f9a490d82..871c05c7e 100644
--- a/Source/Wpf/Prism.Wpf/Services/Dialogs/DefaultDialogs/DialogWindow.xaml
+++ b/Source/Wpf/Prism.Wpf/Services/Dialogs/DialogWindow.xaml
@@ -1,4 +1,4 @@
-
/// Interaction logic for DialogWindow.xaml