Skip to content

Commit 51fa53f

Browse files
Chnages for Avalonia 11 (#744)
1 parent ec67521 commit 51fa53f

File tree

11 files changed

+59
-39
lines changed

11 files changed

+59
-39
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,4 +250,6 @@ src/*.Tests/**/ApiApprovalTests*.received.txt
250250
.idea/
251251

252252
# Fody Weavers (for tests)
253-
src/Tools/
253+
src/Tools/
254+
/hooks
255+
/lfs/objects
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Application xmlns="https://github.com/avaloniaui"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
x:Class="ReactiveAvalonia.HelloWorld.App">
3+
x:Class="ReactiveAvalonia.HelloWorld.App"
4+
RequestedThemeVariant="Dark">
45
<Application.Styles>
5-
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
6-
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
6+
<FluentTheme />
77
</Application.Styles>
88
</Application>

avalonia/hello-world/HelloWorld/HelloWorld.csproj

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<ApplicationIcon />
66
<StartupObject />
77
</PropertyGroup>
@@ -14,8 +14,14 @@
1414
</AvaloniaResource>
1515
</ItemGroup>
1616
<ItemGroup>
17-
<PackageReference Include="Avalonia" Version="0.9.0-preview7" />
18-
<PackageReference Include="Avalonia.ReactiveUI" Version="0.9.0-preview7" />
19-
<PackageReference Include="Avalonia.Desktop" Version="0.9.0-preview7" />
17+
<PackageReference Include="Avalonia.Desktop" Version="11.0.4" />
18+
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.4" />
19+
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.4" />
20+
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.4" />
21+
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.4" />
22+
<PackageReference Include="Serilog" Version="3.0.1" />
23+
</ItemGroup>
24+
<ItemGroup>
25+
<PackageReference Update="Roslynator.Analyzers" Version="4.4.0" />
2026
</ItemGroup>
2127
</Project>

avalonia/hello-world/HelloWorld/MainView.xaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
Height="200"
1010
MinWidth="320"
1111
MinHeight="200">
12-
<!-- http://avaloniaui.net/docs/reactiveui/activation#activation-example - View.xaml -->
13-
<!-- https://reactiveui.net/docs/handbook/data-binding/avalonia -->
14-
<TextBlock
15-
Name="tbGreetingLabel"
16-
VerticalAlignment="Center"
17-
HorizontalAlignment="Center"
18-
FontSize="16" />
12+
<Grid>
13+
<TextBlock
14+
Name="tbGreetingLabel"
15+
VerticalAlignment="Center"
16+
HorizontalAlignment="Center"
17+
FontSize="16" />
18+
</Grid>
1919
</Window>

avalonia/hello-world/HelloWorld/MainView.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public MainView() {
1919
this
2020
.WhenActivated(
2121
disposables => {
22-
// Jut log the View's activation
22+
23+
// Just log the View's activation
2324
Console.WriteLine(
2425
$"[v {Thread.CurrentThread.ManagedThreadId}]: " +
2526
"View activated\n");

avalonia/hello-world/HelloWorld/Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Avalonia;
22
using Avalonia.Controls;
3-
using Avalonia.Logging.Serilog;
43
using Avalonia.ReactiveUI;
54

65
namespace ReactiveAvalonia.HelloWorld {
@@ -16,7 +15,7 @@ public static AppBuilder BuildAvaloniaApp() {
1615
.Configure<App>()
1716
.UseReactiveUI()
1817
.UsePlatformDetect()
19-
.LogToDebug();
18+
.LogToTrace();
2019
}
2120

2221
private static void AppMain(Application app, string[] args) {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Application xmlns="https://github.com/avaloniaui"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
x:Class="ReactiveAvalonia.RandomBuddyStalker.App">
3+
x:Class="ReactiveAvalonia.RandomBuddyStalker.App"
4+
RequestedThemeVariant="Dark">
45
<Application.Styles>
5-
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
6-
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
6+
<FluentTheme />
77
</Application.Styles>
88
</Application>

avalonia/hello-world/RandomBuddyStalker/Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Avalonia;
22
using Avalonia.Controls;
3-
using Avalonia.Logging.Serilog;
43
using Avalonia.ReactiveUI;
54

65
namespace ReactiveAvalonia.RandomBuddyStalker {
@@ -14,7 +13,7 @@ public static AppBuilder BuildAvaloniaApp() {
1413
.Configure<App>()
1514
.UseReactiveUI()
1615
.UsePlatformDetect()
17-
.LogToDebug();
16+
.LogToTrace();
1817
}
1918

2019
private static void AppMain(Application app, string[] args) {
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<ApplicationIcon />
66
<StartupObject />
77
</PropertyGroup>
@@ -14,12 +14,19 @@
1414
</AvaloniaResource>
1515
</ItemGroup>
1616
<ItemGroup>
17-
<PackageReference Include="Avalonia" Version="0.9.0-preview7" />
18-
<PackageReference Include="Avalonia.Desktop" Version="0.9.0-preview7" />
19-
<PackageReference Include="Avalonia.ReactiveUI" Version="0.9.0-preview7" />
20-
<PackageReference Include="Flurl.Http" Version="2.4.2" />
21-
<PackageReference Include="Flurl" Version="3.0.0-pre1" />
22-
<PackageReference Include="ReactiveUI.Fody" Version="10.5.31" />
23-
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
17+
<PackageReference Include="Avalonia" Version="11.0.4" />
18+
<PackageReference Include="Avalonia.Desktop" Version="11.0.4" />
19+
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.4" />
20+
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.4" />
21+
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.4" />
22+
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.4" />
23+
<PackageReference Include="Flurl.Http" Version="3.2.4" />
24+
<PackageReference Include="Flurl" Version="3.0.7" />
25+
<PackageReference Include="ReactiveUI.Fody" Version="19.4.1" />
26+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
27+
<PackageReference Include="Serilog" Version="3.0.1" />
28+
</ItemGroup>
29+
<ItemGroup>
30+
<PackageReference Update="Roslynator.Analyzers" Version="4.4.0" />
2431
</ItemGroup>
2532
</Project>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Application xmlns="https://github.com/avaloniaui"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
x:Class="ReactiveUI.Samples.Suspension.App">
3+
x:Class="ReactiveUI.Samples.Suspension.App"
4+
RequestedThemeVariant="Dark">
45
<Application.Styles>
5-
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
6-
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
6+
<FluentTheme />
77
</Application.Styles>
88
</Application>
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
</PropertyGroup>
77

@@ -12,16 +12,22 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Avalonia.Desktop" Version="0.10.*" />
16-
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.*" />
17-
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.*" />
15+
<PackageReference Include="Avalonia.Desktop" Version="11.0.4" />
16+
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.4" />
17+
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.4" />
18+
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.4" />
19+
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.4" />
1820
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
19-
<PackageReference Include="Splat.Serilog" Version="14.6.8" />
21+
<PackageReference Include="Splat.Serilog" Version="14.7.1" />
2022
</ItemGroup>
2123

2224
<ItemGroup>
2325
<None Update="appstate.json">
2426
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
2527
</None>
2628
</ItemGroup>
29+
30+
<ItemGroup>
31+
<PackageReference Update="Roslynator.Analyzers" Version="4.4.0" />
32+
</ItemGroup>
2733
</Project>

0 commit comments

Comments
 (0)