From 51fa53fc7cb72cf5a6eeb84ab2e1d5fd5626e379 Mon Sep 17 00:00:00 2001 From: Philippe Laval Date: Sat, 2 Sep 2023 15:49:32 +0200 Subject: [PATCH] Chnages for Avalonia 11 (#744) --- .gitignore | 4 +++- avalonia/hello-world/HelloWorld/App.xaml | 6 ++--- .../hello-world/HelloWorld/HelloWorld.csproj | 14 +++++++---- avalonia/hello-world/HelloWorld/MainView.xaml | 14 +++++------ .../hello-world/HelloWorld/MainView.xaml.cs | 3 ++- avalonia/hello-world/HelloWorld/Program.cs | 3 +-- .../hello-world/RandomBuddyStalker/App.xaml | 6 ++--- .../hello-world/RandomBuddyStalker/Program.cs | 3 +-- .../RandomBuddyStalker.csproj | 23 ++++++++++++------- .../ReactiveUI.Samples.Suspension/App.xaml | 6 ++--- .../ReactiveUI.Samples.Suspension.csproj | 16 +++++++++---- 11 files changed, 59 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index c88ebe9b..454b9852 100644 --- a/.gitignore +++ b/.gitignore @@ -250,4 +250,6 @@ src/*.Tests/**/ApiApprovalTests*.received.txt .idea/ # Fody Weavers (for tests) -src/Tools/ \ No newline at end of file +src/Tools/ +/hooks +/lfs/objects diff --git a/avalonia/hello-world/HelloWorld/App.xaml b/avalonia/hello-world/HelloWorld/App.xaml index 4eef7ca4..8b6a3c85 100644 --- a/avalonia/hello-world/HelloWorld/App.xaml +++ b/avalonia/hello-world/HelloWorld/App.xaml @@ -1,8 +1,8 @@ + x:Class="ReactiveAvalonia.HelloWorld.App" + RequestedThemeVariant="Dark"> - - + diff --git a/avalonia/hello-world/HelloWorld/HelloWorld.csproj b/avalonia/hello-world/HelloWorld/HelloWorld.csproj index 8a4f9291..1c178815 100644 --- a/avalonia/hello-world/HelloWorld/HelloWorld.csproj +++ b/avalonia/hello-world/HelloWorld/HelloWorld.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp3.0 + net7.0 @@ -14,8 +14,14 @@ - - - + + + + + + + + + diff --git a/avalonia/hello-world/HelloWorld/MainView.xaml b/avalonia/hello-world/HelloWorld/MainView.xaml index fe591e7d..136ae596 100644 --- a/avalonia/hello-world/HelloWorld/MainView.xaml +++ b/avalonia/hello-world/HelloWorld/MainView.xaml @@ -9,11 +9,11 @@ Height="200" MinWidth="320" MinHeight="200"> - - - + + + diff --git a/avalonia/hello-world/HelloWorld/MainView.xaml.cs b/avalonia/hello-world/HelloWorld/MainView.xaml.cs index 8aa74d0d..81737dd2 100644 --- a/avalonia/hello-world/HelloWorld/MainView.xaml.cs +++ b/avalonia/hello-world/HelloWorld/MainView.xaml.cs @@ -19,7 +19,8 @@ public MainView() { this .WhenActivated( disposables => { - // Jut log the View's activation + + // Just log the View's activation Console.WriteLine( $"[v {Thread.CurrentThread.ManagedThreadId}]: " + "View activated\n"); diff --git a/avalonia/hello-world/HelloWorld/Program.cs b/avalonia/hello-world/HelloWorld/Program.cs index a2425e00..fa2fef45 100644 --- a/avalonia/hello-world/HelloWorld/Program.cs +++ b/avalonia/hello-world/HelloWorld/Program.cs @@ -1,6 +1,5 @@ using Avalonia; using Avalonia.Controls; -using Avalonia.Logging.Serilog; using Avalonia.ReactiveUI; namespace ReactiveAvalonia.HelloWorld { @@ -16,7 +15,7 @@ public static AppBuilder BuildAvaloniaApp() { .Configure() .UseReactiveUI() .UsePlatformDetect() - .LogToDebug(); + .LogToTrace(); } private static void AppMain(Application app, string[] args) { diff --git a/avalonia/hello-world/RandomBuddyStalker/App.xaml b/avalonia/hello-world/RandomBuddyStalker/App.xaml index c1c14a68..31d8fad8 100644 --- a/avalonia/hello-world/RandomBuddyStalker/App.xaml +++ b/avalonia/hello-world/RandomBuddyStalker/App.xaml @@ -1,8 +1,8 @@ + x:Class="ReactiveAvalonia.RandomBuddyStalker.App" + RequestedThemeVariant="Dark"> - - + diff --git a/avalonia/hello-world/RandomBuddyStalker/Program.cs b/avalonia/hello-world/RandomBuddyStalker/Program.cs index 76b5e505..07060b3e 100644 --- a/avalonia/hello-world/RandomBuddyStalker/Program.cs +++ b/avalonia/hello-world/RandomBuddyStalker/Program.cs @@ -1,6 +1,5 @@ using Avalonia; using Avalonia.Controls; -using Avalonia.Logging.Serilog; using Avalonia.ReactiveUI; namespace ReactiveAvalonia.RandomBuddyStalker { @@ -14,7 +13,7 @@ public static AppBuilder BuildAvaloniaApp() { .Configure() .UseReactiveUI() .UsePlatformDetect() - .LogToDebug(); + .LogToTrace(); } private static void AppMain(Application app, string[] args) { diff --git a/avalonia/hello-world/RandomBuddyStalker/RandomBuddyStalker.csproj b/avalonia/hello-world/RandomBuddyStalker/RandomBuddyStalker.csproj index d6b0cc0b..ab687253 100644 --- a/avalonia/hello-world/RandomBuddyStalker/RandomBuddyStalker.csproj +++ b/avalonia/hello-world/RandomBuddyStalker/RandomBuddyStalker.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp3.0 + net7.0 @@ -14,12 +14,19 @@ - - - - - - - + + + + + + + + + + + + + + diff --git a/avalonia/suspension/ReactiveUI.Samples.Suspension/App.xaml b/avalonia/suspension/ReactiveUI.Samples.Suspension/App.xaml index 2515d0eb..117a5aaf 100644 --- a/avalonia/suspension/ReactiveUI.Samples.Suspension/App.xaml +++ b/avalonia/suspension/ReactiveUI.Samples.Suspension/App.xaml @@ -1,8 +1,8 @@ + x:Class="ReactiveUI.Samples.Suspension.App" + RequestedThemeVariant="Dark"> - - + diff --git a/avalonia/suspension/ReactiveUI.Samples.Suspension/ReactiveUI.Samples.Suspension.csproj b/avalonia/suspension/ReactiveUI.Samples.Suspension/ReactiveUI.Samples.Suspension.csproj index 91efe34b..c481155e 100644 --- a/avalonia/suspension/ReactiveUI.Samples.Suspension/ReactiveUI.Samples.Suspension.csproj +++ b/avalonia/suspension/ReactiveUI.Samples.Suspension/ReactiveUI.Samples.Suspension.csproj @@ -1,7 +1,7 @@  WinExe - net6.0 + net7.0 enable @@ -12,11 +12,13 @@ - - - + + + + + - + @@ -24,4 +26,8 @@ Always + + + +