philipp2604.WpfNavigation
1.1.0
See the version list below for details.
dotnet add package philipp2604.WpfNavigation --version 1.1.0
NuGet\Install-Package philipp2604.WpfNavigation -Version 1.1.0
<PackageReference Include="philipp2604.WpfNavigation" Version="1.1.0" />
paket add philipp2604.WpfNavigation --version 1.1.0
#r "nuget: philipp2604.WpfNavigation, 1.1.0"
// Install philipp2604.WpfNavigation as a Cake Addin #addin nuget:?package=philipp2604.WpfNavigation&version=1.1.0 // Install philipp2604.WpfNavigation as a Cake Tool #tool nuget:?package=philipp2604.WpfNavigation&version=1.1.0
WpfNavigation
Description
This library allows for simple adding of navigation regions to WPF applications.
This means, you can navigate to different views (optionally with view models) in ContentControls.
Download
You can acquire this library either directly via the NuGet package manager or by downloading it from the NuGet Gallery.
Quick Start
I recommend having a look at the example project.
Prepare your existing view by adding a
ContentControl
and registering it to theRegionNavigationService
with a specific region key.- Registration of regions can be done by calling
RegionNavigationService.RegisterRegion(_YourRegionKey_, _YourContentControl_)
- Or by using the
NavigationService.NavigationRegion="_YourRegionKey_"
property inside the ContentControl's xaml.
- Registration of regions can be done by calling
Create the views that you want to navigate to.
Optionally, create view models for your views.
- If needed, you can implement the
INavigationAware
interface in your view models, making them being notified when navigation occurs.
- If needed, you can implement the
Register your views and view models to the
RegionContentService
with a specific content key.- Views-only are registered by calling
RegionContentService.RegisterContent<_YourViewType_>(_YourContentKey_)
. - If you want to register a view and a view model, you can call
RegionContentService.RegisterContent<_YourViewType_, _YourViewModelType_>(_YourContentKey_)
.
- Views-only are registered by calling
Done! You can now navigate to your views by simply calling
RegionNavigationService.Navigate(_YourRegionKey_, _YourContentKey_)
.
Questions? Problems?
Feel free to reach out!
Ideas
- Add support for more Controls (Frames, ...).
Third Party Software / Packages
Please have a look at THIRD-PARTY-LICENSES for all the awesome packages used in this library.
License
This library is MIT licensed.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows7.0 is compatible. |
-
net8.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release but with updated package definition.