VijayAnand.MauiToolkit
1.1.0-preview.4
Prefix Reserved
See the version list below for details.
dotnet add package VijayAnand.MauiToolkit --version 1.1.0-preview.4
NuGet\Install-Package VijayAnand.MauiToolkit -Version 1.1.0-preview.4
<PackageReference Include="VijayAnand.MauiToolkit" Version="1.1.0-preview.4" />
paket add VijayAnand.MauiToolkit --version 1.1.0-preview.4
#r "nuget: VijayAnand.MauiToolkit, 1.1.0-preview.4"
// Install VijayAnand.MauiToolkit as a Cake Addin #addin nuget:?package=VijayAnand.MauiToolkit&version=1.1.0-preview.4&prerelease // Install VijayAnand.MauiToolkit as a Cake Tool #tool nuget:?package=VijayAnand.MauiToolkit&version=1.1.0-preview.4&prerelease
VijayAnand.MauiToolkit
This is a toolkit with a set of helper methods and classes to simplify working with .NET MAUI and Blazor.
Published as a NuGet package - VijayAnand.MauiToolkit
It depends on VijayAnand.MauiToolkit.Core NuGet package.
To start with, implements the concrete definition of the abstractions defined in Core package:
- Dialogs -
DialogService
(works with MainPage or Shell definition)- Additional abstraction specific to .NET MAUI with
FlowDirection
- Additional abstraction specific to .NET MAUI with
- Navigation -
NavigationService
(based on Shell Navigation pattern) - Share -
ShareService
(based on Maui Essentials) - Theme -
ThemeService
(based on UserAppTheme property)
And includes a set of Markup extension methods for rapid application development with C#.
These fluent APIs are made available in the VijayAnand.MauiToolkit.Markup
namespace.
Most importantly, provides an extension method to register these services in .NET MAUI host builder startup:
UseVijayAnandMauiToolkit()
Now it's possible to selectively register the services required into the DI container.
Added a configuration parameter of Enum type ServiceRegistrations
(Flags-attributed) to the UseVijayAnandMauiToolkit()
method.
To illustrate with a sample, if only interested in NavigationService:
Then, invoke UseVijayAnandMauiToolkit(ServiceRegistrations.Navigation)
.
And if DialogService is required along with NavigationService:
Then, invoke UseVijayAnandMauiToolkit(ServiceRegistrations.Dialogs | ServiceRegistrations.Navigation)
.
By default, the default value of configuration parameter is set to ServiceRegistrations.All
.
Usage:
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder.UseMauiApp<App>()
.UseVijayAnandMauiToolkit(); // Implicit value of ServiceRegistrations.All passed as configuration parameter
return builder.Build();
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-android31.0 is compatible. net6.0-ios was computed. net6.0-ios16.1 is compatible. net6.0-maccatalyst was computed. net6.0-maccatalyst16.1 is compatible. net6.0-macos was computed. net6.0-tizen7.0 is compatible. net6.0-tvos was computed. net6.0-windows was computed. net6.0-windows10.0.19041 is compatible. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- VijayAnand.MauiToolkit.Core (>= 1.1.0-preview.4)
-
net6.0-android31.0
- VijayAnand.MauiToolkit.Core (>= 1.1.0-preview.4)
-
net6.0-ios16.1
- System.Runtime.InteropServices.NFloat.Internal (>= 6.0.1)
- VijayAnand.MauiToolkit.Core (>= 1.1.0-preview.4)
-
net6.0-maccatalyst16.1
- System.Runtime.InteropServices.NFloat.Internal (>= 6.0.1)
- VijayAnand.MauiToolkit.Core (>= 1.1.0-preview.4)
-
net6.0-tizen7.0
- VijayAnand.MauiToolkit.Core (>= 1.1.0-preview.4)
-
net6.0-windows10.0.19041
- VijayAnand.MauiToolkit.Core (>= 1.1.0-preview.4)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on VijayAnand.MauiToolkit:
Package | Downloads |
---|---|
VijayAnand.MauiToolkit.Pro
VijayAnand.MauiToolkit.Pro is a toolkit with a set of helper methods and classes to simplify working with .NET MAUI and Blazor. |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on VijayAnand.MauiToolkit:
Repository | Stars |
---|---|
egvijayanand/dotnet-maui-samples
.NET MAUI Samples
|
|
egvijayanand/dotnet-maui-templates
.NET MAUI Project and Item Templates for VS2022 and CLI.
|
|
drakewill-CRL/ROMSorter
Detect and rename ROMs and other games
|
Version | Downloads | Last updated |
---|---|---|
3.1.0 | 376 | 11/27/2023 |
3.0.0 | 86 | 11/14/2023 |
3.0.0-rc.2.2 | 56 | 11/7/2023 |
3.0.0-rc.2.1 | 67 | 10/31/2023 |
3.0.0-rc.2 | 65 | 10/13/2023 |
3.0.0-rc.1 | 72 | 9/18/2023 |
3.0.0-preview.7 | 62 | 9/12/2023 |
3.0.0-preview.1 | 98 | 4/24/2023 |
2.1.3 | 68 | 11/7/2023 |
2.1.2 | 73 | 10/31/2023 |
2.1.1 | 87 | 10/13/2023 |
2.1.0 | 138 | 9/19/2023 |
2.1.0-preview.7 | 62 | 9/12/2023 |
2.1.0-preview.6 | 63 | 4/24/2023 |
2.1.0-preview.5 | 105 | 1/3/2023 |
2.1.0-preview.4 | 94 | 1/2/2023 |
2.1.0-preview.3 | 74 | 12/30/2022 |
2.1.0-preview.2 | 70 | 12/28/2022 |
2.1.0-preview.1 | 73 | 12/27/2022 |
2.0.1 | 1,505 | 12/14/2022 |
2.0.0 | 805 | 11/11/2022 |
1.1.0 | 75 | 9/19/2023 |
1.1.0-preview.7 | 63 | 9/12/2023 |
1.1.0-preview.6 | 67 | 4/24/2023 |
1.1.0-preview.5 | 73 | 1/3/2023 |
1.1.0-preview.4 | 71 | 1/2/2023 |
1.1.0-preview.3 | 75 | 12/30/2022 |
1.1.0-preview.2 | 77 | 12/28/2022 |
1.1.0-preview.1 | 80 | 12/27/2022 |
1.0.3 | 660 | 12/14/2022 |
1.0.2 | 592 | 11/11/2022 |
1.0.2-pre3 | 411 | 8/4/2022 |
1.0.2-pre2 | 656 | 7/15/2022 |
1.0.2-pre1 | 394 | 7/4/2022 |
1.0.1 | 5,813 | 6/18/2022 |
1.0.1-pre1 | 382 | 6/9/2022 |
1.0.0 | 1,679 | 5/23/2022 |
1.0.0-pre9 | 181 | 4/29/2022 |
1.0.0-pre8 | 360 | 4/27/2022 |
1.0.0-pre7 | 316 | 4/12/2022 |
1.0.0-pre6 | 131 | 4/12/2022 |
1.0.0-pre5 | 122 | 4/4/2022 |
1.0.0-pre4 | 205 | 3/31/2022 |
1.0.0-pre3 | 122 | 3/31/2022 |
1.0.0-pre2 | 149 | 3/18/2022 |
1.0.0-pre12 | 126 | 5/13/2022 |
1.0.0-pre11 | 315 | 5/11/2022 |
1.0.0-pre10 | 111 | 5/5/2022 |
1.0.0-pre1 | 130 | 3/7/2022 |
What's new in ver. 1.1.0-preview.4:
-----------------------------------
Additional parameter introduced in the custom Prompt dialog to validate the user entered value before dismissing the dialog.
1.1.0-preview.3:
DialogService class is now marked as internal.
And to show the .NET MAUI dialogs, follow any of the below-mentioned approaches:
1. via Dependency Injection:
Register the dependency in the .NET MAUI startup pipeline.
Either with the UseVijayAnandMauiToolkit() extension method (invoked on the MauiAppBuilder instance).
Or directly add it to the Service collection, like:
builder.Services.AddSingleton<IDialogService>(GenericDialog.Instance);
builder.Services.AddSingleton<IMauiDialogService>(MauiDialog.Instance);
Then inject the implementation instance of the IDialogService/IMauiDialogService into the Page and invoke the appropriate method.
// Assuming _dialogService is the injected instance of IDialogService
await _dialogService.DisplayAlertAsync("Greeting", "Hello World", "OK");
// Assuming _mauiDialogService is the injected instance of IMauiDialogService with FlowDirection support
await _mauiDialogService.DisplayAlertAsync("Greeting", "Hello World", "OK", FlowDirection.RightToLeft);
2. via Static:
Instance of IDialogService is accessible via the GenericDialog/MauiDialog type's Instance property.
await GenericDialog.Instance.DisplayAlertAsync("Greeting", "Hello World", "OK");
// with FlowDirection support
await MauiDialog.Instance.DisplayAlertAsync("Greeting", "Hello World", "OK", FlowDirection.RightToLeft);
v1.1.0-preview.1:
1. ServiceRegistrations enum type is now moved to Core package.
2. Defined the MauiPage class, a base page to inherit while defining other pages, to easily work with .NET MAUI.
v1.0.3:
This version of package is released on top of .NET MAUI on .NET 6 SR8 (6.0.548) version.
v1.0.2:
Package supports .NET MAUI on .NET 6 and is built on top of .NET 6 SR7 (6.0.547).
DisplayActionSheetAsync method in DialogService class now takes message and defaultButton as additional parameters in accordance with updated interface definition.
Added a new Markup Method, named AddSubMenuGroup, to define a sub-menu group within a menu group to manage the multi-level menu.
Here is an example of a sub-menu group:
"Change Location" is a first level menu group (under the "Locations" top level menu item) and "India" is a second level menu group within that.
This way multi-level menu can be defined.
MenuBarItems.Add(new MenuBarItem().Title("Locations")
.AddMenuGroup(new MenuFlyoutSubItem().Title("Change Location")
.AddSubMenuItem(new MenuFlyoutItem().Title("New York, USA"))
.AddSubMenuItem(new MenuFlyoutItem().Title("London, UK"))
.AddSubMenuItem(new MenuFlyoutItem().Title("Cape Town, RSA"))
.AddSubMenuItem(new MenuFlyoutItem().Title("Beijing, PRC"))
.AddSubMenuGroup(new MenuFlyoutSubItem().Title("India")
.AddSubMenuItem(new MenuFlyoutItem().Title("Chennai, TN"))
.AddSubMenuItem(new MenuFlyoutItem().Title("Kolkata, WB"))
.AddSubMenuItem(new MenuFlyoutItem().Title("Mumbai, MH"))
.AddSubMenuItem(new MenuFlyoutItem().Title("New Delhi, NCR"))))
.AddMenuItem(new MenuFlyoutItem().Title("Add a Location").BindCommand("AddLocationCommand")));
Join me on Developer Thoughts, https://egvijayanand.in/, an exclusive blog for .NET MAUI and Blazor.