P41.Navigation
1.5.0-beta.8
See the version list below for details.
dotnet add package P41.Navigation --version 1.5.0-beta.8
NuGet\Install-Package P41.Navigation -Version 1.5.0-beta.8
<PackageReference Include="P41.Navigation" Version="1.5.0-beta.8" />
paket add P41.Navigation --version 1.5.0-beta.8
#r "nuget: P41.Navigation, 1.5.0-beta.8"
// Install P41.Navigation as a Cake Addin #addin nuget:?package=P41.Navigation&version=1.5.0-beta.8&prerelease // Install P41.Navigation as a Cake Tool #tool nuget:?package=P41.Navigation&version=1.5.0-beta.8&prerelease
Navigation
A project for key to view navigation using ReactiveUI and Flurl.
Platforms
Platform | TFM |
---|---|
.NET Standard 2.0 | netstandard2.0 |
.NET 6.0 | net6.0 |
.NET 6.0 Android | net6.0-android |
.NET 6.0 WPF | net6.0-windows7.0 |
.NET 6.0 WinUI | net6.0-windows10.0.19041 |
UWP 16299 | uap10.0.19041 |
Installation
Replace
X
with the version you want!
.NET CLI
dotnet add package P41.Navigation --version X
Package Reference
<PackageReference Include="P41.Navigation" Version="X" />
Getting Started
You get started by configuring the NavigationHost
for a platform:
UWP
// Application (App.xaml.cs in sample)
services.AddSingleton(sp =>
new NavigationHost()
.Map("page1", static () => typeof(Page1))
.Map("page2", static () => typeof(Page2))
.Map("page3", static () => typeof(Page3)));
// At the end of Application OnLaunched
Window.Current.Activate();
Services.Resolve<INavigationHost>().Navigate("page1/100");
Android
// Application (AndroidApp in sample)
services.AddSingleton(sp =>
new NavigationHost()
.Map("page1", static () => new Page1())
.Map("page2", static () => new Page2())
.Map("page3", static () => new Page3())
);
// Main Activity (Shell in sample) at the end of OnCreate
host.SetFragmentManager(SupportFragmentManager)
.SetFragmentContainerId(R.Id.MainContainer)
.Navigate("page1");
All targets plus .NET 6.0 or .NET Standard 2.0
Then from your code you call navigation methods:
// Shared ViewModel constructor
Navigate = ReactiveCommand.Create<string>(page =>
{
this.Navigate(page);
});
GoBack = ReactiveCommand.Create<Unit>(_ =>
{
this.GoBack());
}
You also register code to run on NavigatedTo and NavigatingFrom similar to ReactiveUI activation.
this.WhenNavigated((Flurl.Url url, CompositeDisposable d) =>
{
});
When the ViewModel is being NavigatedFrom Dispose()
is called on the CompositeDisposable
.
There are also samples in the samples folder that you should see and try!
Build
Install Visual Studio 2022 Preview and .NET 6.0
Clone the project and open the solution then you just build the whole solution or the specific projects/solution folder
you want to build.
Contribute
Contributions are welcome and appreciated, before you create a pull request please open a GitHub Issue to discuss what needs changing and or fixing if the issue doesn't exist!
Product | Versions 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-android31.0 is compatible. 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. net6.0-windows7.0 is compatible. 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. |
.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 was computed. 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. |
Universal Windows Platform | uap10.0.19041 is compatible. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Flurl (>= 3.0.4)
- Microsoft.Bcl.HashCode (>= 1.1.1)
- ReactiveUI (>= 17.1.17)
-
net6.0
- Flurl (>= 3.0.4)
- ReactiveUI (>= 17.1.17)
-
net6.0-android31.0
- Flurl (>= 3.0.4)
- ReactiveUI (>= 17.1.17)
- Xamarin.AndroidX.Fragment (>= 1.3.6.3)
-
net6.0-windows10.0.19041
- Flurl (>= 3.0.4)
- Microsoft.WindowsAppSDK (>= 1.0.0)
- ReactiveUI (>= 17.1.17)
-
net6.0-windows7.0
- Flurl (>= 3.0.4)
- ReactiveUI (>= 17.1.17)
-
UAP 10.0.19041
- Flurl (>= 3.0.4)
- Microsoft.Bcl.HashCode (>= 1.1.1)
- ReactiveUI (>= 17.1.17)
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.6.0-beta.1 | 106 | 11/19/2022 |
1.5.0-beta.10 | 112 | 8/4/2022 |
1.5.0-beta.8 | 115 | 8/4/2022 |
1.5.0-beta.5 | 122 | 2/19/2022 |
1.5.0-beta.4 | 117 | 2/10/2022 |
1.5.0-beta.3 | 119 | 2/9/2022 |
1.5.0-beta.1 | 129 | 1/31/2022 |
1.4.0-beta.4 | 147 | 10/5/2021 |
1.4.0-beta.3 | 211 | 10/2/2021 |
1.4.0-beta.0 | 181 | 9/30/2021 |
1.3.0-beta.0 | 179 | 9/28/2021 |
1.2.0-beta.0 | 181 | 8/22/2021 |
1.1.0-beta.0 | 153 | 8/13/2021 |
1.0.0-beta.1 | 158 | 8/11/2021 |