From 360b34d2d6d8d0d9687a7d2e282868ad634fa76f Mon Sep 17 00:00:00 2001 From: Tobias Wohlleben Date: Tue, 21 Jan 2025 23:04:34 +0100 Subject: [PATCH] wip --- .../TimerControlRectangleAnimation.xaml | 4 +- .../PictureGallery/PictureGalleryPage.xaml | 2 +- .../PictureGallery/PictureGalleryPage.xaml.cs | 17 +++-- src/CamBooth/CamBooth.App/MainWindow.xaml | 67 ++++++++++--------- src/CamBooth/CamBooth.App/MainWindow.xaml.cs | 6 ++ 5 files changed, 54 insertions(+), 42 deletions(-) diff --git a/src/CamBooth/CamBooth.App/Features/LiveView/TimerControlRectangleAnimation.xaml b/src/CamBooth/CamBooth.App/Features/LiveView/TimerControlRectangleAnimation.xaml index df06915..36d9557 100644 --- a/src/CamBooth/CamBooth.App/Features/LiveView/TimerControlRectangleAnimation.xaml +++ b/src/CamBooth/CamBooth.App/Features/LiveView/TimerControlRectangleAnimation.xaml @@ -11,10 +11,10 @@ - + HIER EINE ANWEISUNG ANZEIGEN diff --git a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml index f07ff41..7a9c3cb 100644 --- a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml +++ b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml @@ -4,7 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" - Title="PictureGalleryPage" Width="1600" Height="795" + Title="PictureGalleryPage" Width="1600" Height="900" Background="Black"> diff --git a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml.cs b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml.cs index 704a83c..108f255 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.Effects; using System.Windows.Media.Imaging; using CamBooth.App.Core.AppSettings; @@ -74,7 +75,7 @@ public partial class PictureGalleryPage : Page Image? imageControl = new() { Source = thumbnail, - Width = 381, + Width = 388, Margin = new Thickness(6) }; hyperlink.Inlines.Add(new InlineUIContainer(imageControl)); @@ -97,15 +98,19 @@ public partial class PictureGalleryPage : Page ContentDialog? contentDialog = new(this.RootContentDialogPresenter); Image? imageToShow = new() { + MaxHeight = 570, VerticalAlignment = VerticalAlignment.Center, - Source = PictureGalleryService.CreateThumbnail(picturePathUri.AbsolutePath, 499, 300) + Source = PictureGalleryService.CreateThumbnail(picturePathUri.AbsolutePath, 450, 300) }; - contentDialog.DialogWidth = 940; - contentDialog.PrimaryButtonAppearance = ControlAppearance.Success; - contentDialog.CloseButtonAppearance = ControlAppearance.Primary; + // contentDialog.DialogWidth = 800; + // contentDialog.DialogMaxHeight = 300; + // contentDialog.DialogHeight = 300; + contentDialog.VerticalAlignment = VerticalAlignment.Top; + contentDialog.PrimaryButtonAppearance = ControlAppearance.Caution; + contentDialog.CloseButtonAppearance = ControlAppearance.Dark; - //contentDialog.SetCurrentValue(ContentDialog.TitleProperty, "Hello World"); + // contentDialog.SetCurrentValue(ContentDialog.TitleProperty, "Hello World"); contentDialog.SetCurrentValue(ContentControl.ContentProperty, imageToShow); contentDialog.SetCurrentValue(ContentDialog.CloseButtonTextProperty, "Schließen"); contentDialog.SetCurrentValue(ContentDialog.PrimaryButtonTextProperty, "Drucken"); diff --git a/src/CamBooth/CamBooth.App/MainWindow.xaml b/src/CamBooth/CamBooth.App/MainWindow.xaml index 4eb07c3..1e144ed 100644 --- a/src/CamBooth/CamBooth.App/MainWindow.xaml +++ b/src/CamBooth/CamBooth.App/MainWindow.xaml @@ -10,62 +10,63 @@ Title="MainWindow" Background="Black" Width="1600" Height="900" + WindowStyle="None" + ResizeMode="NoResize" + AllowsTransparency="True" + WindowStartupLocation="CenterScreen" HorizontalAlignment="Stretch"> - - - + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/CamBooth/CamBooth.App/MainWindow.xaml.cs b/src/CamBooth/CamBooth.App/MainWindow.xaml.cs index 306067f..c8ee67b 100644 --- a/src/CamBooth/CamBooth.App/MainWindow.xaml.cs +++ b/src/CamBooth/CamBooth.App/MainWindow.xaml.cs @@ -131,4 +131,10 @@ public partial class MainWindow : Window { this.SetVisibilityPicturePanel(this._isPicturePanelVisible); } + + + private void CloseApp(object sender, RoutedEventArgs e) + { + this.Close(); + } } \ No newline at end of file