Skip to content

Commit

Permalink
Chnages for Avalonia 11 (#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe-Laval authored Sep 2, 2023
1 parent ec67521 commit 51fa53f
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 39 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,6 @@ src/*.Tests/**/ApiApprovalTests*.received.txt
.idea/

# Fody Weavers (for tests)
src/Tools/
src/Tools/
/hooks
/lfs/objects
6 changes: 3 additions & 3 deletions avalonia/hello-world/HelloWorld/App.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="ReactiveAvalonia.HelloWorld.App">
x:Class="ReactiveAvalonia.HelloWorld.App"
RequestedThemeVariant="Dark">
<Application.Styles>
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
<FluentTheme />
</Application.Styles>
</Application>
14 changes: 10 additions & 4 deletions avalonia/hello-world/HelloWorld/HelloWorld.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ApplicationIcon />
<StartupObject />
</PropertyGroup>
Expand All @@ -14,8 +14,14 @@
</AvaloniaResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.9.0-preview7" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.9.0-preview7" />
<PackageReference Include="Avalonia.Desktop" Version="0.9.0-preview7" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.4" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.4" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.4" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.4" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.4" />
<PackageReference Include="Serilog" Version="3.0.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Roslynator.Analyzers" Version="4.4.0" />
</ItemGroup>
</Project>
14 changes: 7 additions & 7 deletions avalonia/hello-world/HelloWorld/MainView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
Height="200"
MinWidth="320"
MinHeight="200">
<!-- http://avaloniaui.net/docs/reactiveui/activation#activation-example - View.xaml -->
<!-- https://reactiveui.net/docs/handbook/data-binding/avalonia -->
<TextBlock
Name="tbGreetingLabel"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="16" />
<Grid>
<TextBlock
Name="tbGreetingLabel"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="16" />
</Grid>
</Window>
3 changes: 2 additions & 1 deletion avalonia/hello-world/HelloWorld/MainView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
3 changes: 1 addition & 2 deletions avalonia/hello-world/HelloWorld/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Logging.Serilog;
using Avalonia.ReactiveUI;

namespace ReactiveAvalonia.HelloWorld {
Expand All @@ -16,7 +15,7 @@ public static AppBuilder BuildAvaloniaApp() {
.Configure<App>()
.UseReactiveUI()
.UsePlatformDetect()
.LogToDebug();
.LogToTrace();
}

private static void AppMain(Application app, string[] args) {
Expand Down
6 changes: 3 additions & 3 deletions avalonia/hello-world/RandomBuddyStalker/App.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="ReactiveAvalonia.RandomBuddyStalker.App">
x:Class="ReactiveAvalonia.RandomBuddyStalker.App"
RequestedThemeVariant="Dark">
<Application.Styles>
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
<FluentTheme />
</Application.Styles>
</Application>
3 changes: 1 addition & 2 deletions avalonia/hello-world/RandomBuddyStalker/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Logging.Serilog;
using Avalonia.ReactiveUI;

namespace ReactiveAvalonia.RandomBuddyStalker {
Expand All @@ -14,7 +13,7 @@ public static AppBuilder BuildAvaloniaApp() {
.Configure<App>()
.UseReactiveUI()
.UsePlatformDetect()
.LogToDebug();
.LogToTrace();
}

private static void AppMain(Application app, string[] args) {
Expand Down
23 changes: 15 additions & 8 deletions avalonia/hello-world/RandomBuddyStalker/RandomBuddyStalker.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ApplicationIcon />
<StartupObject />
</PropertyGroup>
Expand All @@ -14,12 +14,19 @@
</AvaloniaResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.9.0-preview7" />
<PackageReference Include="Avalonia.Desktop" Version="0.9.0-preview7" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.9.0-preview7" />
<PackageReference Include="Flurl.Http" Version="2.4.2" />
<PackageReference Include="Flurl" Version="3.0.0-pre1" />
<PackageReference Include="ReactiveUI.Fody" Version="10.5.31" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Avalonia" Version="11.0.4" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.4" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.4" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.4" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.4" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.4" />
<PackageReference Include="Flurl.Http" Version="3.2.4" />
<PackageReference Include="Flurl" Version="3.0.7" />
<PackageReference Include="ReactiveUI.Fody" Version="19.4.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Serilog" Version="3.0.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Roslynator.Analyzers" Version="4.4.0" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions avalonia/suspension/ReactiveUI.Samples.Suspension/App.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="ReactiveUI.Samples.Suspension.App">
x:Class="ReactiveUI.Samples.Suspension.App"
RequestedThemeVariant="Dark">
<Application.Styles>
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
<FluentTheme />
</Application.Styles>
</Application>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand All @@ -12,16 +12,22 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="0.10.*" />
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.*" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.*" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.4" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.4" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.4" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.4" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.4" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Splat.Serilog" Version="14.6.8" />
<PackageReference Include="Splat.Serilog" Version="14.7.1" />
</ItemGroup>

<ItemGroup>
<None Update="appstate.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Update="Roslynator.Analyzers" Version="4.4.0" />
</ItemGroup>
</Project>

0 comments on commit 51fa53f

Please sign in to comment.