From 8b9128ff09460cb820769ec676b124c6bc1c8a08 Mon Sep 17 00:00:00 2001 From: Vijay Anand E G <81947404+egvijayanand@users.noreply.github.com> Date: Fri, 15 Nov 2024 19:47:15 +0530 Subject: [PATCH] Package updated for .NET MAUI 9 #121 --- README.md | 15 ++++++++++----- .../MauiBlazor.Markup.Net9.csproj | 3 ++- .../MauiBlazor.Markup/overview.md | 18 +++++++++++------- .../MauiBlazor.Markup/release-notes-net9.txt | 8 ++++++-- src/MauiBlazor.Markup/PackageVersion-Net9.txt | 2 +- src/MauiBlazor.Markup/global.json.net9.bak | 4 ++-- 6 files changed, 32 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index e07dd2a..0f86c8a 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Join me on [**Developer Thoughts**](https://egvijayanand.in/), an exclusive blog |Channel|.NET 8|.NET 9| |:---:|:---:|:---:| |Stable|[![.NET 8](https://badgen.net/badge/nuget/v3.5.0/blue?icon=nuget&foo=bar)](https://www.nuget.org/packages/VijayAnand.Toolkit.Markup/3.5.0)|[![.NET 9](https://badgen.net/nuget/v/VijayAnand.Toolkit.Markup/?icon=nuget&foo=bar)](https://www.nuget.org/packages/VijayAnand.Toolkit.Markup/)| - + + + The most useful method will be `Configure`, which can be invoked on an instance of a BlazorWebView and its derivatives, and it simplifies the initialization of BlazorWebView into a single fluent method call as shown in the below sample. diff --git a/src/MauiBlazor.Markup/MauiBlazor.Markup/MauiBlazor.Markup.Net9.csproj b/src/MauiBlazor.Markup/MauiBlazor.Markup/MauiBlazor.Markup.Net9.csproj index b77bb2e..35d24e0 100644 --- a/src/MauiBlazor.Markup/MauiBlazor.Markup/MauiBlazor.Markup.Net9.csproj +++ b/src/MauiBlazor.Markup/MauiBlazor.Markup/MauiBlazor.Markup.Net9.csproj @@ -4,6 +4,7 @@ true + 9.0.0 true @@ -47,7 +48,7 @@ - + diff --git a/src/MauiBlazor.Markup/MauiBlazor.Markup/overview.md b/src/MauiBlazor.Markup/MauiBlazor.Markup/overview.md index a14e94b..935f095 100644 --- a/src/MauiBlazor.Markup/MauiBlazor.Markup/overview.md +++ b/src/MauiBlazor.Markup/MauiBlazor.Markup/overview.md @@ -1,14 +1,14 @@ ### .NET MAUI Blazor Toolkit -This toolkit a set of fluent helper methods and classes to simplify working with .NET MAUI Blazor in C#. +This [markup](https://www.nuget.org/packages/VijayAnand.MauiBlazor.Markup/) package is a set of fluent helper methods and classes to simplify working with .NET MAUI Blazor in C#. -This toolkit depends on [Microsoft.AspNetCore.Components.WebView.Maui](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebView.Maui) NuGet package. +It depends on the [Microsoft.AspNetCore.Components.WebView.Maui](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebView.Maui) NuGet package. -Most useful method will be `Configure`, which can be invoked on an instance of a BlazorWebView and its derivatives, and it simplifies the initialization of BlazorWebView into a single fluent method call as shown in the below sample. +The most useful method will be `Configure`, which can be invoked on an instance of a BlazorWebView and its derivatives, and it simplifies the initialization of BlazorWebView into a single fluent method call as shown in the below sample. Note: `Gateway` is a `Razor` component and assumes it can receive a parameter named `Foo` as described in the sample underneath. -```csharp +```cs namespace MyApp; public class HomePage : ContentPage @@ -17,8 +17,8 @@ public class HomePage : ContentPage { // A BlazorWebView can manage multiple RootComponents, to achieve this, define another Tuple with values of that component // The method and Tuple parameter names are shown for clarity and it's optional - // Blazor component can have initialization parameters, which can be supplied thro parameters, a dictionary of keyValues - // where key is of type string and value is of type object + // Blazor component can have initialization parameters, which can be supplied through parameters, a dictionary of keyValues + // where the key is of type string and value is of type object // Without initialization parameters Content = new BlazorWebView().Configure(hostPage: "wwwroot/index.html", (selector: "#app", componentType: typeof(Gateway), parameters: null)); @@ -26,13 +26,17 @@ public class HomePage : ContentPage // With optional initialization parameters Content = new BlazorWebView().Configure(hostPage: "wwwroot/index.html", (selector: "#app", componentType: typeof(Gateway), parameters: new Dictionary { [nameof(Gateway.Foo)] = "Bar" })); - // In a much simplified form - Real intended usage + // In a simplified form - Real intended usage // Without initialization parameters Content = new BlazorWebView().Configure("wwwroot/index.html", ("#app", typeof(Gateway), null)); + // Much more simplified, assuming hostPage is wwwroot/index.html and selector as #app + Content = new BlazorWebView().Configure(typeof(Gateway)); // With StartPath property introduced in .NET 8 or later, overloaded Configure method // Assuming search is the page with which the app is intended to start Content = new BlazorWebView().Configure("wwwroot/index.html", "/search", ("#app", typeof(Gateway), null)); + // Much more simplified version, assuming hostPage is wwwroot/index.html and selector as #app + Content = new BlazorWebView().Configure(typeof(Gateway), "/search"); // With optional initialization parameters Content = new BlazorWebView().Configure("wwwroot/index.html", ("#app", typeof(Gateway), new Dictionary { [nameof(Gateway.Foo)] = "Bar" })); diff --git a/src/MauiBlazor.Markup/MauiBlazor.Markup/release-notes-net9.txt b/src/MauiBlazor.Markup/MauiBlazor.Markup/release-notes-net9.txt index 9cf0bd8..a654d33 100644 --- a/src/MauiBlazor.Markup/MauiBlazor.Markup/release-notes-net9.txt +++ b/src/MauiBlazor.Markup/MauiBlazor.Markup/release-notes-net9.txt @@ -1,7 +1,11 @@ Join me on Developer Thoughts, https://egvijayanand.in/, an exclusive blog for .NET MAUI and Blazor. -What's new in ver. 4.0.0-rc.2: ------------------------------- +What's new in ver. 4.0.0: +------------------------- +This version of package is built on top of .NET MAUI 9 GA (v9.0.0). + +v4.0.0-rc.2: + This version of package is built on top of .NET MAUI 9 RC2 (v9.0.0-rc.2.24503.2). 4.0.0-rc.1: diff --git a/src/MauiBlazor.Markup/PackageVersion-Net9.txt b/src/MauiBlazor.Markup/PackageVersion-Net9.txt index cd46fc9..fcdb2e1 100644 --- a/src/MauiBlazor.Markup/PackageVersion-Net9.txt +++ b/src/MauiBlazor.Markup/PackageVersion-Net9.txt @@ -1 +1 @@ -4.0.0-rc.2 +4.0.0 diff --git a/src/MauiBlazor.Markup/global.json.net9.bak b/src/MauiBlazor.Markup/global.json.net9.bak index f350572..7052d8b 100644 --- a/src/MauiBlazor.Markup/global.json.net9.bak +++ b/src/MauiBlazor.Markup/global.json.net9.bak @@ -1,7 +1,7 @@ { "sdk": { - "allowPrerelease": true, + "allowPrerelease": false, "rollForward": "latestMinor", - "version": "9.0.100-preview.1.24101.2" + "version": "9.0.100" } }