From 81c8b4181c8abf1f4f01e638e66482bad2cbf28d Mon Sep 17 00:00:00 2001 From: Tobias Wohlleben Date: Wed, 22 Jan 2025 15:12:32 +0100 Subject: [PATCH] wip --- src/CamBooth/CamBooth.App/App.xaml | 3 +- .../CamBooth.App.csproj.DotSettings.user | 4 + .../PictureGallery/PictureGalleryPage.xaml | 4 +- .../PictureGallery/PictureGalleryPage.xaml.cs | 19 +-- src/CamBooth/CamBooth.App/MainWindow.xaml | 20 ++- src/CamBooth/CamBooth.App/MainWindow.xaml.cs | 19 ++- .../CamBooth.App/Resources/ButtonStyles.xaml | 115 ++++++++++++++++++ src/CamBooth/CamBooth.sln.DotSettings.user | 1 + 8 files changed, 168 insertions(+), 17 deletions(-) create mode 100644 src/CamBooth/CamBooth.App/CamBooth.App.csproj.DotSettings.user create mode 100644 src/CamBooth/CamBooth.App/Resources/ButtonStyles.xaml diff --git a/src/CamBooth/CamBooth.App/App.xaml b/src/CamBooth/CamBooth.App/App.xaml index cfcaa33..79b08fe 100644 --- a/src/CamBooth/CamBooth.App/App.xaml +++ b/src/CamBooth/CamBooth.App/App.xaml @@ -8,7 +8,8 @@ + - + \ No newline at end of file diff --git a/src/CamBooth/CamBooth.App/CamBooth.App.csproj.DotSettings.user b/src/CamBooth/CamBooth.App/CamBooth.App.csproj.DotSettings.user new file mode 100644 index 0000000..8d12a10 --- /dev/null +++ b/src/CamBooth/CamBooth.App/CamBooth.App.csproj.DotSettings.user @@ -0,0 +1,4 @@ + + ButtonStyles.xaml + + ButtonStyles.xaml \ No newline at end of file diff --git a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml index 7a9c3cb..1abde65 100644 --- a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml +++ b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml @@ -3,11 +3,13 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" mc:Ignorable="d" Title="PictureGalleryPage" Width="1600" Height="900" Background="Black"> + - + \ No newline at end of file diff --git a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml.cs b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml.cs index de266f4..2b70591 100644 --- a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml.cs +++ b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml.cs @@ -1,6 +1,7 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Documents; +using System.Windows.Media; using System.Windows.Media.Effects; using System.Windows.Media.Imaging; @@ -75,8 +76,8 @@ public partial class PictureGalleryPage : Page Image? imageControl = new() { Source = thumbnail, - Width = 388, - Margin = new Thickness(6) + Width = 392, + Margin = new Thickness(4) }; hyperlink.Inlines.Add(new InlineUIContainer(imageControl)); @@ -95,18 +96,20 @@ public partial class PictureGalleryPage : Page Application.Current.Dispatcher.BeginInvoke( async () => { - ContentDialog? contentDialog = new(this.RootContentDialogPresenter); - Image? imageToShow = new() + ContentDialog contentDialog = new (this.RootContentDialogPresenter); + Image imageToShow = new() { MaxHeight = 570, + Background = new SolidColorBrush(Colors.White), VerticalAlignment = VerticalAlignment.Center, Source = PictureGalleryService.CreateThumbnail(picturePathUri.AbsolutePath, 450, 300) }; - contentDialog.VerticalAlignment = VerticalAlignment.Top; - contentDialog.PrimaryButtonAppearance = ControlAppearance.Caution; - contentDialog.CloseButtonAppearance = ControlAppearance.Dark; - + contentDialog.VerticalAlignment = VerticalAlignment.Top; + contentDialog.PrimaryButtonAppearance = ControlAppearance.Primary; + contentDialog.CloseButtonAppearance = ControlAppearance.Light; + contentDialog.Background = new SolidColorBrush(Colors.White); + contentDialog.Foreground = new SolidColorBrush(Colors.White); // contentDialog.SetCurrentValue(ContentDialog.TitleProperty, "Hello World"); contentDialog.SetCurrentValue(ContentControl.ContentProperty, imageToShow); contentDialog.SetCurrentValue(ContentDialog.CloseButtonTextProperty, "Schließen"); diff --git a/src/CamBooth/CamBooth.App/MainWindow.xaml b/src/CamBooth/CamBooth.App/MainWindow.xaml index 1e144ed..f12942c 100644 --- a/src/CamBooth/CamBooth.App/MainWindow.xaml +++ b/src/CamBooth/CamBooth.App/MainWindow.xaml @@ -45,16 +45,28 @@ Margin="0 0 0 0"> - - + + +