From 7ad587228a0aa12b244a73b2d03ff597ab7bf565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20B=C3=B6rchers?= Date: Sun, 19 Jul 2020 22:19:28 +0200 Subject: [PATCH] Try to create a prism dialog service with custom modern ui window --- App/App.xaml.cs | 2 ++ App/MainWindow.xaml | 10 +++++-- App/MainWindowViewModel.cs | 25 ++++++++++++++++- App/ModernWpfPlayground.csproj | 3 +- App/Types/AccentColors.cs | 4 +-- Controls/Controls.csproj | 2 +- Dialogs/AssemblyInfo.cs | 10 +++++++ Dialogs/DialogService.cs | 32 ++++++++++++++++++++++ Dialogs/Dialogs.csproj | 18 ++++++++++++ Dialogs/MessageBoxView.xaml | 27 ++++++++++++++++++ Dialogs/MessageBoxView.xaml.cs | 26 ++++++++++++++++++ Dialogs/MessageBoxViewModel.cs | 50 ++++++++++++++++++++++++++++++++++ ModernWpfPlayground.sln | 6 ++++ 13 files changed, 208 insertions(+), 7 deletions(-) create mode 100644 Dialogs/AssemblyInfo.cs create mode 100644 Dialogs/DialogService.cs create mode 100644 Dialogs/Dialogs.csproj create mode 100644 Dialogs/MessageBoxView.xaml create mode 100644 Dialogs/MessageBoxView.xaml.cs create mode 100644 Dialogs/MessageBoxViewModel.cs diff --git a/App/App.xaml.cs b/App/App.xaml.cs index f81f2d0..ef9cc9a 100644 --- a/App/App.xaml.cs +++ b/App/App.xaml.cs @@ -1,4 +1,5 @@ using System.Windows; +using Dialogs; using ModernWpf; using ModernWpfPlayground.Types; using Prism.Ioc; @@ -22,6 +23,7 @@ namespace ModernWpfPlayground { containerRegistry.Register(); containerRegistry.Register(); + containerRegistry.RegisterDialog(); } protected override Window CreateShell() diff --git a/App/MainWindow.xaml b/App/MainWindow.xaml index c67964a..99cb6e0 100644 --- a/App/MainWindow.xaml +++ b/App/MainWindow.xaml @@ -242,6 +242,7 @@ HorizontalAlignment="Stretch" Command="{Binding SaveViewModelCommand}" Content="Save" /> +