From c44931c11ed8f83ded7c6f1490e9aefb0b521c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20B=C3=B6rchers?= Date: Sat, 18 Apr 2020 15:44:49 +0200 Subject: [PATCH] binding window height and width and saving properties to file. --- MainWindow.xaml | 7 +++---- MainWindowViewModel.cs | 12 ++++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/MainWindow.xaml b/MainWindow.xaml index 39a0939..0dda7d2 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -1,5 +1,4 @@ - - SetProperty(value, SetTheme); } + public int WindowWidth + { + get => GetProperty(1200); + set => SetProperty(value); + } + + public int WindowHeight + { + get => GetProperty(600); + set => SetProperty(value); + } + private static void SetTheme(ThemeMode themeMode) { ThemeManager.Current.ApplicationTheme = themeMode switch