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">
-
-
+
+
+
+
+ VerticalAlignment="Bottom" Margin="0 0 5 0" />
diff --git a/src/CamBooth/CamBooth.App/MainWindow.xaml.cs b/src/CamBooth/CamBooth.App/MainWindow.xaml.cs
index c8ee67b..4580539 100644
--- a/src/CamBooth/CamBooth.App/MainWindow.xaml.cs
+++ b/src/CamBooth/CamBooth.App/MainWindow.xaml.cs
@@ -55,7 +55,6 @@ public partial class MainWindow : Window
try
{
this._cameraService.TakePhoto();
- SwitchButtonAndTimerPanel();
}
catch (Exception exception)
{
@@ -63,6 +62,10 @@ public partial class MainWindow : Window
System.Windows.MessageBox.Show("Sorry, da ging was schief!");
this._logger.Info(exception.Message);
}
+ finally
+ {
+ SwitchButtonAndTimerPanel();
+ }
}
@@ -117,8 +120,18 @@ public partial class MainWindow : Window
private void StartTakePhotoProcess(object sender, RoutedEventArgs e)
{
- TimerControlRectangleAnimation.StartTimer(5);
- SwitchButtonAndTimerPanel();
+ try
+ {
+ TimerControlRectangleAnimation.StartTimer(5);
+ }
+ catch (Exception exception)
+ {
+ this._logger.Error(exception.Message);
+ }
+ finally
+ {
+ SwitchButtonAndTimerPanel();
+ }
}
private void SwitchButtonAndTimerPanel()
diff --git a/src/CamBooth/CamBooth.App/Resources/ButtonStyles.xaml b/src/CamBooth/CamBooth.App/Resources/ButtonStyles.xaml
new file mode 100644
index 0000000..b67e357
--- /dev/null
+++ b/src/CamBooth/CamBooth.App/Resources/ButtonStyles.xaml
@@ -0,0 +1,115 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CamBooth/CamBooth.sln.DotSettings.user b/src/CamBooth/CamBooth.sln.DotSettings.user
index 07e734a..434000b 100644
--- a/src/CamBooth/CamBooth.sln.DotSettings.user
+++ b/src/CamBooth/CamBooth.sln.DotSettings.user
@@ -7,6 +7,7 @@
True
True
ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded