diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml
index 0725c4bf..9b362c16 100644
--- a/.github/workflows/build-validation.yml
+++ b/.github/workflows/build-validation.yml
@@ -17,7 +17,7 @@ on:
- '**.props'
env:
- DOTNET_VERSION: '8.0.x' # The .NET SDK version to use
+ DOTNET_VERSION: '9.0.x' # The .NET SDK version to use
jobs:
build:
diff --git a/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/App.xaml.cs b/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/App.xaml.cs
index 09d633f9..cdad1622 100644
--- a/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/App.xaml.cs
+++ b/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/App.xaml.cs
@@ -5,7 +5,10 @@ public partial class App : Application
public App()
{
InitializeComponent();
+ }
- MainPage = new AppShell();
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
}
}
diff --git a/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/AppShell.xaml b/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/AppShell.xaml
index 728b9dea..6346cf9c 100644
--- a/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/AppShell.xaml
+++ b/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/AppShell.xaml
@@ -8,21 +8,18 @@
-
-
diff --git a/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/MonkeyFinder.csproj b/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/MonkeyFinder.csproj
index 6625fdce..ed8088d4 100644
--- a/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/MonkeyFinder.csproj
+++ b/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/MonkeyFinder.csproj
@@ -1,9 +1,9 @@
- net8.0-android
- $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
- $(TargetFrameworks);net8.0-windows10.0.19041
+ net9.0-android
+ $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041
Exe
MonkeyFinder
true
@@ -41,8 +41,8 @@
-
-
+
+
diff --git a/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/Resources/Styles/Styles.xaml b/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
index 6e4a0921..c4a38c49 100644
--- a/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
+++ b/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
@@ -57,12 +57,11 @@
-
+
diff --git a/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/View/MainPage.xaml b/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/View/MainPage.xaml
index ce360b8d..b922b104 100644
--- a/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/View/MainPage.xaml
+++ b/Community Modules/XAML/Part 1 - Fundamentals/Finish/MonkeyFinder/View/MainPage.xaml
@@ -34,10 +34,10 @@
-
-
-
-
+
+
+
+
-
+
diff --git a/Community Modules/XAML/Part 1 - Fundamentals/README.md b/Community Modules/XAML/Part 1 - Fundamentals/README.md
index 03092a1f..9ffa9a33 100644
--- a/Community Modules/XAML/Part 1 - Fundamentals/README.md
+++ b/Community Modules/XAML/Part 1 - Fundamentals/README.md
@@ -288,13 +288,12 @@ Now cut and paste the remaining `Resources` from `App.xaml` into `Styles.xaml`.
-
```
diff --git a/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/App.xaml.cs b/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/App.xaml.cs
index 09d633f9..cdad1622 100644
--- a/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/App.xaml.cs
+++ b/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/App.xaml.cs
@@ -5,7 +5,10 @@ public partial class App : Application
public App()
{
InitializeComponent();
+ }
- MainPage = new AppShell();
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
}
}
diff --git a/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/AppShell.xaml b/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/AppShell.xaml
index 728b9dea..6346cf9c 100644
--- a/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/AppShell.xaml
+++ b/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/AppShell.xaml
@@ -8,21 +8,18 @@
-
-
diff --git a/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/MonkeyFinder.csproj b/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/MonkeyFinder.csproj
index 32c163a3..933810af 100644
--- a/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/MonkeyFinder.csproj
+++ b/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/MonkeyFinder.csproj
@@ -1,9 +1,9 @@
- net8.0-android
- $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
- $(TargetFrameworks);net8.0-windows10.0.19041
+ net9.0-android
+ $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041
Exe
MonkeyFinder
true
@@ -41,7 +41,7 @@
-
-
+
+
diff --git a/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/Resources/Styles/Styles.xaml b/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
index 6e4a0921..c4a38c49 100644
--- a/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
+++ b/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
@@ -57,12 +57,11 @@
-
+
diff --git a/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/View/MainPage.xaml b/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/View/MainPage.xaml
index a3b79006..759594ca 100644
--- a/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/View/MainPage.xaml
+++ b/Community Modules/XAML/Part 2 - Responsibility/Finish/MonkeyFinder/View/MainPage.xaml
@@ -25,10 +25,10 @@
-
-
-
-
+
+
+
+
-
+
diff --git a/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/App.xaml.cs b/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/App.xaml.cs
index 09d633f9..cdad1622 100644
--- a/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/App.xaml.cs
+++ b/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/App.xaml.cs
@@ -5,7 +5,10 @@ public partial class App : Application
public App()
{
InitializeComponent();
+ }
- MainPage = new AppShell();
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
}
}
diff --git a/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/AppShell.xaml b/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/AppShell.xaml
index 728b9dea..6346cf9c 100644
--- a/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/AppShell.xaml
+++ b/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/AppShell.xaml
@@ -8,21 +8,18 @@
-
-
diff --git a/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/MonkeyFinder.csproj b/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/MonkeyFinder.csproj
index 0058496a..972b1ccf 100644
--- a/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/MonkeyFinder.csproj
+++ b/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/MonkeyFinder.csproj
@@ -1,9 +1,9 @@
- net8.0-android
- $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
- $(TargetFrameworks);net8.0-windows10.0.19041
+ net9.0-android
+ $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041
Exe
MonkeyFinder
true
@@ -41,8 +41,8 @@
-
-
+
+
diff --git a/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/Resources/Styles/Styles.xaml b/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
index 7f04b57f..b1701537 100644
--- a/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
+++ b/Community Modules/XAML/Part 3 - Magic Values/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
@@ -57,14 +57,13 @@
-
+
-
diff --git a/Community Modules/XAML/Part 4 - Naming/Finish/MonkeyFinder/MonkeyFinder.csproj b/Community Modules/XAML/Part 4 - Naming/Finish/MonkeyFinder/MonkeyFinder.csproj
index 0058496a..972b1ccf 100644
--- a/Community Modules/XAML/Part 4 - Naming/Finish/MonkeyFinder/MonkeyFinder.csproj
+++ b/Community Modules/XAML/Part 4 - Naming/Finish/MonkeyFinder/MonkeyFinder.csproj
@@ -1,9 +1,9 @@
- net8.0-android
- $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
- $(TargetFrameworks);net8.0-windows10.0.19041
+ net9.0-android
+ $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041
Exe
MonkeyFinder
true
@@ -41,8 +41,8 @@
-
-
+
+
diff --git a/Community Modules/XAML/Part 4 - Naming/Finish/MonkeyFinder/Resources/Styles/Styles.xaml b/Community Modules/XAML/Part 4 - Naming/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
index 031f7fdc..c9265aa0 100644
--- a/Community Modules/XAML/Part 4 - Naming/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
+++ b/Community Modules/XAML/Part 4 - Naming/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
@@ -57,14 +57,13 @@
-
+
-
diff --git a/Community Modules/XAML/Part 5 - Custom Types/Finish/MonkeyFinder/MonkeyFinder.csproj b/Community Modules/XAML/Part 5 - Custom Types/Finish/MonkeyFinder/MonkeyFinder.csproj
index d7543c06..e507bf38 100644
--- a/Community Modules/XAML/Part 5 - Custom Types/Finish/MonkeyFinder/MonkeyFinder.csproj
+++ b/Community Modules/XAML/Part 5 - Custom Types/Finish/MonkeyFinder/MonkeyFinder.csproj
@@ -1,9 +1,9 @@
- net8.0-android
- $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
- $(TargetFrameworks);net8.0-windows10.0.19041
+ net9.0-android
+ $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041
Exe
MonkeyFinder
true
@@ -23,8 +23,8 @@
-
-
+
+
diff --git a/Community Modules/XAML/Part 5 - Custom Types/Finish/MonkeyFinder/Resources/Styles/Styles.xaml b/Community Modules/XAML/Part 5 - Custom Types/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
index 031f7fdc..c9265aa0 100644
--- a/Community Modules/XAML/Part 5 - Custom Types/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
+++ b/Community Modules/XAML/Part 5 - Custom Types/Finish/MonkeyFinder/Resources/Styles/Styles.xaml
@@ -57,14 +57,13 @@
-
+
-
diff --git a/Finish/MonkeyFinder/App.xaml.cs b/Finish/MonkeyFinder/App.xaml.cs
index 09d633f9..cdad1622 100644
--- a/Finish/MonkeyFinder/App.xaml.cs
+++ b/Finish/MonkeyFinder/App.xaml.cs
@@ -5,7 +5,10 @@ public partial class App : Application
public App()
{
InitializeComponent();
+ }
- MainPage = new AppShell();
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
}
}
diff --git a/Finish/MonkeyFinder/AppShell.xaml b/Finish/MonkeyFinder/AppShell.xaml
index 0d08840b..d2667a96 100644
--- a/Finish/MonkeyFinder/AppShell.xaml
+++ b/Finish/MonkeyFinder/AppShell.xaml
@@ -9,18 +9,18 @@
-
-
diff --git a/Finish/MonkeyFinder/MonkeyFinder.csproj b/Finish/MonkeyFinder/MonkeyFinder.csproj
index 80676d45..2c73e3bd 100644
--- a/Finish/MonkeyFinder/MonkeyFinder.csproj
+++ b/Finish/MonkeyFinder/MonkeyFinder.csproj
@@ -1,9 +1,9 @@
- net8.0-android
- $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
- $(TargetFrameworks);net8.0-windows10.0.19041
+ net9.0-android
+ $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041
Exe
MonkeyFinder
true
@@ -40,7 +40,7 @@
-
-
+
+
diff --git a/Finish/MonkeyFinder/View/MainPage.xaml b/Finish/MonkeyFinder/View/MainPage.xaml
index 75b043ea..c95c354b 100644
--- a/Finish/MonkeyFinder/View/MainPage.xaml
+++ b/Finish/MonkeyFinder/View/MainPage.xaml
@@ -38,12 +38,12 @@
-
-
+
+
-
+
-
+
diff --git a/Part 0 - Overview/README.md b/Part 0 - Overview/README.md
index bc217bda..16a9aec1 100644
--- a/Part 0 - Overview/README.md
+++ b/Part 0 - Overview/README.md
@@ -176,11 +176,14 @@ namespace MyMauiApp;
public class App : Application
{
public App()
- {
- InitializeComponent();
-
- MainPage = new AppShell();
- }
+ {
+ InitializeComponent();
+ }
+
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
+ }
}
```
diff --git a/Part 0 - Overview/README.zh-cn.md b/Part 0 - Overview/README.zh-cn.md
index 3708b7e9..fc451bf0 100644
--- a/Part 0 - Overview/README.zh-cn.md
+++ b/Part 0 - Overview/README.zh-cn.md
@@ -170,11 +170,14 @@ namespace MyMauiApp;
public class App : Application
{
public App()
- {
- InitializeComponent();
-
- MainPage = new AppShell();
- }
+ {
+ InitializeComponent();
+ }
+
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
+ }
}
```
diff --git a/Part 0 - Overview/README.zh-tw.md b/Part 0 - Overview/README.zh-tw.md
index 87a00fcd..622809eb 100644
--- a/Part 0 - Overview/README.zh-tw.md
+++ b/Part 0 - Overview/README.zh-tw.md
@@ -170,11 +170,14 @@ namespace MyMauiApp;
public class App : Application
{
public App()
- {
- InitializeComponent();
-
- MainPage = new AppShell();
- }
+ {
+ InitializeComponent();
+ }
+
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
+ }
}
```
diff --git a/Part 1 - Displaying Data/MonkeyFinder/App.xaml b/Part 1 - Displaying Data/MonkeyFinder/App.xaml
index 09c403ed..c97a060e 100644
--- a/Part 1 - Displaying Data/MonkeyFinder/App.xaml
+++ b/Part 1 - Displaying Data/MonkeyFinder/App.xaml
@@ -56,13 +56,12 @@
-
diff --git a/Part 1 - Displaying Data/MonkeyFinder/App.xaml.cs b/Part 1 - Displaying Data/MonkeyFinder/App.xaml.cs
index 09d633f9..cdad1622 100644
--- a/Part 1 - Displaying Data/MonkeyFinder/App.xaml.cs
+++ b/Part 1 - Displaying Data/MonkeyFinder/App.xaml.cs
@@ -5,7 +5,10 @@ public partial class App : Application
public App()
{
InitializeComponent();
+ }
- MainPage = new AppShell();
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
}
}
diff --git a/Part 1 - Displaying Data/MonkeyFinder/AppShell.xaml b/Part 1 - Displaying Data/MonkeyFinder/AppShell.xaml
index 1a5b5ec1..8c8b9897 100644
--- a/Part 1 - Displaying Data/MonkeyFinder/AppShell.xaml
+++ b/Part 1 - Displaying Data/MonkeyFinder/AppShell.xaml
@@ -7,22 +7,22 @@
-
-
-
-
-
-
+
+
+
+
+
diff --git a/Part 1 - Displaying Data/MonkeyFinder/MonkeyFinder.csproj b/Part 1 - Displaying Data/MonkeyFinder/MonkeyFinder.csproj
index bb210f23..4971e2df 100644
--- a/Part 1 - Displaying Data/MonkeyFinder/MonkeyFinder.csproj
+++ b/Part 1 - Displaying Data/MonkeyFinder/MonkeyFinder.csproj
@@ -1,9 +1,9 @@
- net8.0-android
- $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
- $(TargetFrameworks);net8.0-windows10.0.19041
+ net9.0-android
+ $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041
Exe
MonkeyFinder
true
@@ -41,7 +41,7 @@
-
-
+
+
diff --git a/Part 2 - MVVM/MonkeyFinder/App.xaml b/Part 2 - MVVM/MonkeyFinder/App.xaml
index f0c3e703..fa86dd37 100644
--- a/Part 2 - MVVM/MonkeyFinder/App.xaml
+++ b/Part 2 - MVVM/MonkeyFinder/App.xaml
@@ -56,13 +56,12 @@
-
diff --git a/Part 2 - MVVM/MonkeyFinder/App.xaml.cs b/Part 2 - MVVM/MonkeyFinder/App.xaml.cs
index 09d633f9..cdad1622 100644
--- a/Part 2 - MVVM/MonkeyFinder/App.xaml.cs
+++ b/Part 2 - MVVM/MonkeyFinder/App.xaml.cs
@@ -5,7 +5,10 @@ public partial class App : Application
public App()
{
InitializeComponent();
+ }
- MainPage = new AppShell();
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
}
}
diff --git a/Part 2 - MVVM/MonkeyFinder/AppShell.xaml b/Part 2 - MVVM/MonkeyFinder/AppShell.xaml
index 6186d8d9..ba65733a 100644
--- a/Part 2 - MVVM/MonkeyFinder/AppShell.xaml
+++ b/Part 2 - MVVM/MonkeyFinder/AppShell.xaml
@@ -7,22 +7,22 @@
-
-
-
-
-
-
+
+
+
+
+
diff --git a/Part 2 - MVVM/MonkeyFinder/MonkeyFinder.csproj b/Part 2 - MVVM/MonkeyFinder/MonkeyFinder.csproj
index bb210f23..4971e2df 100644
--- a/Part 2 - MVVM/MonkeyFinder/MonkeyFinder.csproj
+++ b/Part 2 - MVVM/MonkeyFinder/MonkeyFinder.csproj
@@ -1,9 +1,9 @@
- net8.0-android
- $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
- $(TargetFrameworks);net8.0-windows10.0.19041
+ net9.0-android
+ $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041
Exe
MonkeyFinder
true
@@ -41,7 +41,7 @@
-
-
+
+
diff --git a/Part 2 - MVVM/README.md b/Part 2 - MVVM/README.md
index 0cc62db5..68bc9403 100644
--- a/Part 2 - MVVM/README.md
+++ b/Part 2 - MVVM/README.md
@@ -145,13 +145,13 @@ public partial class BaseViewModel : ObservableObject
Here, we can see that our code has been greatly simplified with an `ObservableObject` base class that implements `INotifyPropertyChanged` and also attributes to expose our properties.
-Note that both isBusy and title have the `[ObservableProperty]` attribute attached to it. The code that is generated looks nearly identical to what we manually wrote. Additionally, the isBusy property has `[NotifyPropertyChangedFor(nameof(IsNotBusy))]`, which will also notify `IsNotBusy` when the value changes. To see the generated code head to the project and then expand **Dependencies -> net8.0-android -> Analyzers -> CommunityToolkit.Mvvm.SourceGenerators -> CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator** and open `MonkeyFinder.ViewModel.BaseViewModel.cs`:
+Note that both isBusy and title have the `[ObservableProperty]` attribute attached to it. The code that is generated looks nearly identical to what we manually wrote. Additionally, the isBusy property has `[NotifyPropertyChangedFor(nameof(IsNotBusy))]`, which will also notify `IsNotBusy` when the value changes. To see the generated code head to the project and then expand **Dependencies -> net9.0-android -> Analyzers -> CommunityToolkit.Mvvm.SourceGenerators -> CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator** and open `MonkeyFinder.ViewModel.BaseViewModel.cs`:
Here is what our `IsBusy` looks like:
```csharp
-[global::System.CodeDom.Compiler.GeneratedCode("CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator", "8.0.0.0")]
+[global::System.CodeDom.Compiler.GeneratedCode("CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator", "8.3.0.0")]
[global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public bool IsBusy
@@ -597,7 +597,7 @@ It is now time to build the .NET MAUI user interface in `View/MainPage.xaml`. Ou
-
+
-
+
@@ -642,7 +642,7 @@ It is now time to build the .NET MAUI user interface in `View/MainPage.xaml`. Ou
-
+
-
+
@@ -697,7 +697,7 @@ It is now time to build the .NET MAUI user interface in `View/MainPage.xaml`. Ou
-
+
-
+
diff --git a/Part 2 - MVVM/README.zh-cn.md b/Part 2 - MVVM/README.zh-cn.md
index 0a5ff9d2..981530d7 100644
--- a/Part 2 - MVVM/README.zh-cn.md
+++ b/Part 2 - MVVM/README.zh-cn.md
@@ -143,12 +143,12 @@ public partial class BaseViewModel : ObservableObject
在这里,我们可以看到我们的代码已经大大简化成了一个 `ObservableObject` 基类,它实现了 `INotifyPropertyChanged` 以及绑定相关属性。
-请注意,isBusy 和 title 都附加了 `[ObservableProperty]` 属性。 生成的代码看起来几乎与我们手动编写的相同。 另外,isBusy 属性有 `[NotifyPropertyChangedFor(nameof(IsNotBusy))]`,当值改变时也会通知 `IsNotBusy`。 要查看生成的代码,请转到项目,然后展开 **Dependencies -> net8.0-android -> Analyzers -> CommunityToolkit.Mvvm.SourceGenerators -> CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator** 并打开`MonkeyFinder.ViewModel。 BaseViewModel.cs`:
+请注意,isBusy 和 title 都附加了 `[ObservableProperty]` 属性。 生成的代码看起来几乎与我们手动编写的相同。 另外,isBusy 属性有 `[NotifyPropertyChangedFor(nameof(IsNotBusy))]`,当值改变时也会通知 `IsNotBusy`。 要查看生成的代码,请转到项目,然后展开 **Dependencies -> net9.0-android -> Analyzers -> CommunityToolkit.Mvvm.SourceGenerators -> CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator** 并打开`MonkeyFinder.ViewModel。 BaseViewModel.cs`:
这是我们的 `IsBusy` 属性:
```csharp
-[global::System.CodeDom.Compiler.GeneratedCode("CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator", "8.0.0.0")]
+[global::System.CodeDom.Compiler.GeneratedCode("CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator", "8.3.0.0")]
[global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public bool IsBusy
@@ -598,7 +598,7 @@ monkeyList = JsonSerializer.Deserialize(contents, MonkeyContext.Default.ListMonk
-
+
-
+
@@ -643,7 +643,7 @@ monkeyList = JsonSerializer.Deserialize(contents, MonkeyContext.Default.ListMonk
-
+
-
+
@@ -699,7 +699,7 @@ monkeyList = JsonSerializer.Deserialize(contents, MonkeyContext.Default.ListMonk
-
+
-
+
diff --git a/Part 2 - MVVM/README.zh-tw.md b/Part 2 - MVVM/README.zh-tw.md
index e950392a..6c5c7ed0 100644
--- a/Part 2 - MVVM/README.zh-tw.md
+++ b/Part 2 - MVVM/README.zh-tw.md
@@ -143,12 +143,12 @@ public partial class BaseViewModel : ObservableObject
在這邊,可以看到目前的程式碼已變成透過繼承 `ObservableObject` 類別為基底類別的設計,由於它已經完成實作 `INotifyPropertyChanged` 及其相關繫結屬性的設計,並提供了 AOP 的模式供以掛載到在 `BaseViewModel` 中所設計的欄位。
-所以可以注意到 isBusy 和 title 欄位都附掛了 `[ObservableProperty]` 的設計。所編譯後的程式碼看起來幾乎和先前設計撰寫的程式碼相同。另外,isBusy 欄位有額外掛上 `[NotifyPropertyChangedFor(nameof(IsNotBusy))]`,當欄位值有改變時也會通知 `IsNotBusy` 屬性。要查看編譯後的程式碼,請到透過方案總管的專案當中,並展開 **Dependencies -> net8.0-android -> Analyzers -> CommunityToolkit.Mvvm.SourceGenerators -> CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator** 並開啟 `MonkeyFinder.ViewModel. BaseViewModel.cs`:
+所以可以注意到 isBusy 和 title 欄位都附掛了 `[ObservableProperty]` 的設計。所編譯後的程式碼看起來幾乎和先前設計撰寫的程式碼相同。另外,isBusy 欄位有額外掛上 `[NotifyPropertyChangedFor(nameof(IsNotBusy))]`,當欄位值有改變時也會通知 `IsNotBusy` 屬性。要查看編譯後的程式碼,請到透過方案總管的專案當中,並展開 **Dependencies -> net9.0-android -> Analyzers -> CommunityToolkit.Mvvm.SourceGenerators -> CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator** 並開啟 `MonkeyFinder.ViewModel. BaseViewModel.cs`:
以下是在編譯時期自動產生的 `IsBusy` 屬性:
```csharp
-[global::System.CodeDom.Compiler.GeneratedCode("CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator", "8.0.0.0")]
+[global::System.CodeDom.Compiler.GeneratedCode("CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator", "8.3.0.0")]
[global::System.Diagnostics.DebuggerNonUserCode]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public bool IsBusy
@@ -591,7 +591,7 @@ monkeyList = JsonSerializer.Deserialize(contents, MonkeyContext.Default.ListMonk
-
+
-
+
@@ -636,7 +636,7 @@ monkeyList = JsonSerializer.Deserialize(contents, MonkeyContext.Default.ListMonk
-
+
-
+
@@ -690,7 +690,7 @@ monkeyList = JsonSerializer.Deserialize(contents, MonkeyContext.Default.ListMonk
-
+
-
+
diff --git a/Part 3 - Navigation/MonkeyFinder/App.xaml b/Part 3 - Navigation/MonkeyFinder/App.xaml
index ad6dcc8f..fdca91f7 100644
--- a/Part 3 - Navigation/MonkeyFinder/App.xaml
+++ b/Part 3 - Navigation/MonkeyFinder/App.xaml
@@ -56,13 +56,12 @@
-
diff --git a/Part 3 - Navigation/MonkeyFinder/App.xaml.cs b/Part 3 - Navigation/MonkeyFinder/App.xaml.cs
index 09d633f9..cdad1622 100644
--- a/Part 3 - Navigation/MonkeyFinder/App.xaml.cs
+++ b/Part 3 - Navigation/MonkeyFinder/App.xaml.cs
@@ -5,7 +5,10 @@ public partial class App : Application
public App()
{
InitializeComponent();
+ }
- MainPage = new AppShell();
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
}
}
diff --git a/Part 3 - Navigation/MonkeyFinder/AppShell.xaml b/Part 3 - Navigation/MonkeyFinder/AppShell.xaml
index 6186d8d9..ba65733a 100644
--- a/Part 3 - Navigation/MonkeyFinder/AppShell.xaml
+++ b/Part 3 - Navigation/MonkeyFinder/AppShell.xaml
@@ -7,22 +7,22 @@
-
-
-
-
-
-
+
+
+
+
+
diff --git a/Part 3 - Navigation/MonkeyFinder/MonkeyFinder.csproj b/Part 3 - Navigation/MonkeyFinder/MonkeyFinder.csproj
index bb210f23..4971e2df 100644
--- a/Part 3 - Navigation/MonkeyFinder/MonkeyFinder.csproj
+++ b/Part 3 - Navigation/MonkeyFinder/MonkeyFinder.csproj
@@ -1,9 +1,9 @@
- net8.0-android
- $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
- $(TargetFrameworks);net8.0-windows10.0.19041
+ net9.0-android
+ $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041
Exe
MonkeyFinder
true
@@ -41,7 +41,7 @@
-
-
+
+
diff --git a/Part 3 - Navigation/MonkeyFinder/View/MainPage.xaml b/Part 3 - Navigation/MonkeyFinder/View/MainPage.xaml
index 036eeab4..2e39f699 100644
--- a/Part 3 - Navigation/MonkeyFinder/View/MainPage.xaml
+++ b/Part 3 - Navigation/MonkeyFinder/View/MainPage.xaml
@@ -19,7 +19,7 @@
-
+
-
+
diff --git a/Part 3 - Navigation/README.md b/Part 3 - Navigation/README.md
index 92175114..2b2caa88 100644
--- a/Part 3 - Navigation/README.md
+++ b/Part 3 - Navigation/README.md
@@ -79,7 +79,7 @@ Now, let's add navigation to a second page that displays monkey details!
- This code checks to see if the selected item is non-null and then uses the built in Shell `Navigation` API to push a new page with the monkey as a parameter and then deselects the item.
-1. In `MainPage.xaml` we can add an `TapGestureRecognizer` event to the `Frame` of our monkey inside of the `CollectionView.ItemTemplate`:
+1. In `MainPage.xaml` we can add an `TapGestureRecognizer` event to the `Border` of our monkey inside of the `CollectionView.ItemTemplate`:
Before:
@@ -87,7 +87,7 @@ Now, let's add navigation to a second page that displays monkey details!
-
+
-
+
@@ -113,13 +113,13 @@ Now, let's add navigation to a second page that displays monkey details!
-
+
-
+
-
+
-
+
diff --git a/Part 3 - Navigation/README.zh-cn.md b/Part 3 - Navigation/README.zh-cn.md
index 28af3a68..6f856f23 100644
--- a/Part 3 - Navigation/README.zh-cn.md
+++ b/Part 3 - Navigation/README.zh-cn.md
@@ -76,7 +76,7 @@ public partial class DetailsPage : ContentPage
- 此代码检查所选项目是否为非空,并使用内置的 Shell `Navigation` API 以猴子为参数推送新页面,然后取消选择该项目。
-2. 在 `MainPage.xaml` 中,我们可以在 `CollectionView.ItemTemplate` 内的猴子的 `Frame` 中添加 `TapGestureRecognizer` 事件:
+2. 在 `MainPage.xaml` 中,我们可以在 `CollectionView.ItemTemplate` 内的猴子的 `Border` 中添加 `TapGestureRecognizer` 事件:
之前:
@@ -84,7 +84,7 @@ public partial class DetailsPage : ContentPage
-
+
-
+
@@ -110,13 +110,13 @@ public partial class DetailsPage : ContentPage
-
+
-
+
-
+
-
+
diff --git a/Part 3 - Navigation/README.zh-tw.md b/Part 3 - Navigation/README.zh-tw.md
index 8a855947..b940adb9 100644
--- a/Part 3 - Navigation/README.zh-tw.md
+++ b/Part 3 - Navigation/README.zh-tw.md
@@ -76,7 +76,7 @@ public partial class DetailsPage : ContentPage
- 此方法中一開始先檢查參數所得到的資料是否為空值,若不是空值才透過 Shell 內建用以 `Navigation` 的 `GoToAsync()` 方法,並將帶入的猴子資料為呼叫方法的引數資料,來轉跳進入詳細頁面。
-2. 在 `MainPage.xaml` 當中,找到 `CollectionView.ItemTemplate` 有關設置 `Frame` 的部分,並增加中 `TapGestureRecognizer` 的事件:
+2. 在 `MainPage.xaml` 當中,找到 `CollectionView.ItemTemplate` 有關設置 `Border` 的部分,並增加中 `TapGestureRecognizer` 的事件:
增加前:
@@ -84,7 +84,7 @@ public partial class DetailsPage : ContentPage
-
+
-
+
@@ -111,13 +111,13 @@ public partial class DetailsPage : ContentPage
-
+
-
+
-
+
-
+
diff --git a/Part 4 - Platform Features/MonkeyFinder/App.xaml b/Part 4 - Platform Features/MonkeyFinder/App.xaml
index 93a065fe..1b4ab3ac 100644
--- a/Part 4 - Platform Features/MonkeyFinder/App.xaml
+++ b/Part 4 - Platform Features/MonkeyFinder/App.xaml
@@ -56,13 +56,12 @@
-
diff --git a/Part 4 - Platform Features/MonkeyFinder/App.xaml.cs b/Part 4 - Platform Features/MonkeyFinder/App.xaml.cs
index 09d633f9..cdad1622 100644
--- a/Part 4 - Platform Features/MonkeyFinder/App.xaml.cs
+++ b/Part 4 - Platform Features/MonkeyFinder/App.xaml.cs
@@ -5,7 +5,10 @@ public partial class App : Application
public App()
{
InitializeComponent();
+ }
- MainPage = new AppShell();
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
}
}
diff --git a/Part 4 - Platform Features/MonkeyFinder/AppShell.xaml b/Part 4 - Platform Features/MonkeyFinder/AppShell.xaml
index 6186d8d9..ba65733a 100644
--- a/Part 4 - Platform Features/MonkeyFinder/AppShell.xaml
+++ b/Part 4 - Platform Features/MonkeyFinder/AppShell.xaml
@@ -7,22 +7,22 @@
-
-
-
-
-
-
+
+
+
+
+
diff --git a/Part 4 - Platform Features/MonkeyFinder/MonkeyFinder.csproj b/Part 4 - Platform Features/MonkeyFinder/MonkeyFinder.csproj
index bb210f23..4971e2df 100644
--- a/Part 4 - Platform Features/MonkeyFinder/MonkeyFinder.csproj
+++ b/Part 4 - Platform Features/MonkeyFinder/MonkeyFinder.csproj
@@ -1,9 +1,9 @@
- net8.0-android
- $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
- $(TargetFrameworks);net8.0-windows10.0.19041
+ net9.0-android
+ $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041
Exe
MonkeyFinder
true
@@ -41,7 +41,7 @@
-
-
+
+
diff --git a/Part 4 - Platform Features/MonkeyFinder/View/MainPage.xaml b/Part 4 - Platform Features/MonkeyFinder/View/MainPage.xaml
index be4c0ee9..ad7f785b 100644
--- a/Part 4 - Platform Features/MonkeyFinder/View/MainPage.xaml
+++ b/Part 4 - Platform Features/MonkeyFinder/View/MainPage.xaml
@@ -19,12 +19,12 @@
-
-
+
+
-
+
-
+
diff --git a/Part 5 - CollectionView/MonkeyFinder/App.xaml b/Part 5 - CollectionView/MonkeyFinder/App.xaml
index 93a065fe..1b4ab3ac 100644
--- a/Part 5 - CollectionView/MonkeyFinder/App.xaml
+++ b/Part 5 - CollectionView/MonkeyFinder/App.xaml
@@ -56,13 +56,12 @@
-
diff --git a/Part 5 - CollectionView/MonkeyFinder/App.xaml.cs b/Part 5 - CollectionView/MonkeyFinder/App.xaml.cs
index 09d633f9..cdad1622 100644
--- a/Part 5 - CollectionView/MonkeyFinder/App.xaml.cs
+++ b/Part 5 - CollectionView/MonkeyFinder/App.xaml.cs
@@ -5,7 +5,10 @@ public partial class App : Application
public App()
{
InitializeComponent();
+ }
- MainPage = new AppShell();
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
}
}
diff --git a/Part 5 - CollectionView/MonkeyFinder/AppShell.xaml b/Part 5 - CollectionView/MonkeyFinder/AppShell.xaml
index 6186d8d9..ba65733a 100644
--- a/Part 5 - CollectionView/MonkeyFinder/AppShell.xaml
+++ b/Part 5 - CollectionView/MonkeyFinder/AppShell.xaml
@@ -7,22 +7,22 @@
-
-
-
-
-
-
+
+
+
+
+
diff --git a/Part 5 - CollectionView/MonkeyFinder/MonkeyFinder.csproj b/Part 5 - CollectionView/MonkeyFinder/MonkeyFinder.csproj
index bb210f23..4971e2df 100644
--- a/Part 5 - CollectionView/MonkeyFinder/MonkeyFinder.csproj
+++ b/Part 5 - CollectionView/MonkeyFinder/MonkeyFinder.csproj
@@ -1,9 +1,9 @@
- net8.0-android
- $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
- $(TargetFrameworks);net8.0-windows10.0.19041
+ net9.0-android
+ $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041
Exe
MonkeyFinder
true
@@ -41,7 +41,7 @@
-
-
+
+
diff --git a/Part 5 - CollectionView/MonkeyFinder/View/MainPage.xaml b/Part 5 - CollectionView/MonkeyFinder/View/MainPage.xaml
index 14ceecf7..bb5204af 100644
--- a/Part 5 - CollectionView/MonkeyFinder/View/MainPage.xaml
+++ b/Part 5 - CollectionView/MonkeyFinder/View/MainPage.xaml
@@ -21,12 +21,12 @@
-
-
+
+
-
+
-
+
diff --git a/Part 6 - AppThemes/MonkeyFinder/App.xaml b/Part 6 - AppThemes/MonkeyFinder/App.xaml
index 93a065fe..1b4ab3ac 100644
--- a/Part 6 - AppThemes/MonkeyFinder/App.xaml
+++ b/Part 6 - AppThemes/MonkeyFinder/App.xaml
@@ -56,13 +56,12 @@
-
diff --git a/Part 6 - AppThemes/MonkeyFinder/App.xaml.cs b/Part 6 - AppThemes/MonkeyFinder/App.xaml.cs
index 09d633f9..cdad1622 100644
--- a/Part 6 - AppThemes/MonkeyFinder/App.xaml.cs
+++ b/Part 6 - AppThemes/MonkeyFinder/App.xaml.cs
@@ -5,7 +5,10 @@ public partial class App : Application
public App()
{
InitializeComponent();
+ }
- MainPage = new AppShell();
+ protected override Window CreateWindow(IActivationState activationState)
+ {
+ return new Window(new AppShell());
}
}
diff --git a/Part 6 - AppThemes/MonkeyFinder/AppShell.xaml b/Part 6 - AppThemes/MonkeyFinder/AppShell.xaml
index 6186d8d9..ba65733a 100644
--- a/Part 6 - AppThemes/MonkeyFinder/AppShell.xaml
+++ b/Part 6 - AppThemes/MonkeyFinder/AppShell.xaml
@@ -7,22 +7,22 @@
-
-
-
-
-
-
+
+
+
+
+
diff --git a/Part 6 - AppThemes/MonkeyFinder/MonkeyFinder.csproj b/Part 6 - AppThemes/MonkeyFinder/MonkeyFinder.csproj
index bb210f23..4971e2df 100644
--- a/Part 6 - AppThemes/MonkeyFinder/MonkeyFinder.csproj
+++ b/Part 6 - AppThemes/MonkeyFinder/MonkeyFinder.csproj
@@ -1,9 +1,9 @@
- net8.0-android
- $(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
- $(TargetFrameworks);net8.0-windows10.0.19041
+ net9.0-android
+ $(TargetFrameworks);net9.0-ios;net9.0-maccatalyst
+ $(TargetFrameworks);net9.0-windows10.0.19041
Exe
MonkeyFinder
true
@@ -41,7 +41,7 @@
-
-
+
+
diff --git a/Part 6 - AppThemes/MonkeyFinder/View/MainPage.xaml b/Part 6 - AppThemes/MonkeyFinder/View/MainPage.xaml
index b5d6feb9..b67814eb 100644
--- a/Part 6 - AppThemes/MonkeyFinder/View/MainPage.xaml
+++ b/Part 6 - AppThemes/MonkeyFinder/View/MainPage.xaml
@@ -38,12 +38,12 @@
-
-
+
+
-
+
-
+
diff --git a/README.md b/README.md
index eef78446..cf5540a0 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ This workshop is available in the following languages:
* [Chinese (Traditional)](README.zh-tw.md) - README filed ending with .zh-tw.md (Translated by [James Tsai](https://github.com/JamestsaiTW))
## Setup Guide
-Hey there! This workshop will be a hands on and a bring your own device workshop. You can develop on PC or Mac and all you will need to do is install Visual Studio 2022 or Visual Studio for Mac 2022 with the .NET MAUI workload. It is built on .NET 8, which means you will need version 17.9 of Visual Studio 2022 or newer. See [full installation guide for .NET MAUI](https://learn.microsoft.com/dotnet/maui/get-started/installation?view=net-maui-8.0) for more information.
+Hey there! This workshop will be a hands on and a bring your own device workshop. You can develop on PC or Mac and all you will need to do is install Visual Studio 2022 or Visual Studio for Mac 2022 with the .NET MAUI workload. It is built on .NET 9, which means you will need version 17.12 of Visual Studio 2022 or newer. See [full installation guide for .NET MAUI](https://learn.microsoft.com/dotnet/maui/get-started/installation?view=net-maui-8.0) for more information.
Before starting the workshop, I recommend going through the quick 10 minute [.NET MAUI Tutorial](https://docs.microsoft.com/dotnet/maui/get-started/first-app?WT.mc_id=friends-mauiworkshop-jamont) that will guide you through installation and also ensuring everything is configured correct.