Mvvm.Navigation.Avalonia 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Mvvm.Navigation.Avalonia --version 0.1.0                
NuGet\Install-Package Mvvm.Navigation.Avalonia -Version 0.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mvvm.Navigation.Avalonia" Version="0.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mvvm.Navigation.Avalonia --version 0.1.0                
#r "nuget: Mvvm.Navigation.Avalonia, 0.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Mvvm.Navigation.Avalonia as a Cake Addin
#addin nuget:?package=Mvvm.Navigation.Avalonia&version=0.1.0

// Install Mvvm.Navigation.Avalonia as a Cake Tool
#tool nuget:?package=Mvvm.Navigation.Avalonia&version=0.1.0                

Mvvm.Navigation

CI/CD License: MIT Discord NuGet NuGet NuGet NuGet NuGet NuGet NuGet NuGet

Provides platform independent navigation at the MVVM level and a Source Generator that automatically binds view and view models and registers this in your DI container.

🔥Features🔥

  • Uses DI to resolve your view from view model.
  • Generates an extension method for you with all your Views and ViewModels to register them in DI.
  • Supports automatic mapping between View and ViewModel based on a global attribute
  • Allows case-by-case, attribute-based control for Views
  • Does not contain custom controls, everything happens based on the attached dependency property and does not limit the user.
  • Allows forward/backward navigation like in Chrome

Usage

Add .AddMvvmNavigation() call to your Host builder:

public sealed partial class App
{
    public App()
    {
        AppHost = Host
            .CreateDefaultBuilder()
            .AddMvvmNavigation()
            .Build();
    }
}

Add ViewFor attribute:

using Mvvm.Navigation;

[ViewFor<MainViewModel>]
public partial class MainPage : UserControl;

Add Navigator to your ViewModel:

public Navigator<ObservableObject> Navigator { get; }

Add commands to your views(or just use Navigator from ViewModel):

<Grid>
    <Button
        Command="{Binding Navigator.NavigateByTypeCommand}"
        CommandParameter="{x:Type viewModels:BlueViewModel}"
        />
    <ContentControl mvvm:Properties.Navigator="{Binding Navigator}"/>
</Grid>

Support

Priority place for bugs: https://github.com/HavenDV/Mvvm.Navigation/issues
Priority place for ideas and general questions: https://github.com/HavenDV/Mvvm.Navigation/discussions
I also have a Discord support channel:
https://discord.gg/g8u2t9dKgE

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.1 157 3/5/2024
1.5.0 108 3/4/2024
1.4.5 223 12/4/2023
1.4.4 107 12/4/2023
1.4.3 122 12/4/2023
1.4.1 109 12/3/2023
1.4.0 110 12/3/2023
1.3.0 108 12/1/2023
1.2.7 131 9/22/2023
1.2.6 114 9/22/2023
1.2.5 117 9/21/2023
1.2.4 102 9/16/2023
1.2.3 107 9/16/2023
1.2.2 135 9/14/2023
1.2.1 136 9/14/2023
1.2.0 119 9/14/2023
1.1.3 127 9/11/2023
1.1.2 116 9/11/2023
1.1.1 105 9/7/2023
1.1.0 126 9/5/2023
1.0.1 120 9/4/2023
1.0.0 117 9/3/2023
0.2.0 119 9/3/2023
0.1.0 119 9/2/2023

⭐ Last 10 features:
- feat: Added HostApplicationBuilderExtensions. 2023-09-02
- feat: Removed Ioc.Default from main code. 2023-09-02
- feat: Added DI constructor generation for cases with ViewModel + Constructor. 2023-09-02
- feat: To single AddMvvmNavigation extension. 2023-09-02
- feat: Added HostBuilderExtensions generating. 2023-09-02
- feat: Added initial GlobalGenerator. 2023-09-02
- feat: Publish WebAssembly. 2023-09-02
- feat: Added ConstructorGenerator and ViewModelGenerator. 2023-09-02
- feat: Updated DP generator. 2023-09-02
- feat: Added AddViewsAndViewModels() extension when no classes with ViewFor attributes. 2023-09-02

🐞 Last 10 bug fixes:
- fix: Fixed CI. 2023-09-02
- fix: Fixed CI. 2023-09-02
- fix: Fixed CI. 2023-09-02
- fix: Added some null checks. 2023-09-02
- fix: Fixed warnings. 2023-08-31