No description
| .forgejo/workflows | ||
| Demo | ||
| ViewHelper | ||
| ViewHelper.Avalonia | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| renovate.json | ||
| ViewHelper.sln | ||
| ViewHelper.sln.DotSettings | ||
ViewHelper
This library provides simple implementations for view locating and animated navigation within AvaloniaUI applications.
Features
ViewLocator
// Create the ViewLocator - a service locator may be passed optionally
var locator = new AvaloniaViewLocator();
// Resolve view
var view = locator.ResolveView<MainView, MainViewModel>()
Navigation
// Usage within another ViewModel:
// Push the resolved view
Navigation.PushAsync(view)
Available methods
- PushAsync
- PopAsync
- PopToRootAsync
- SetRootAsync
Initialization
Ensure that .UseViewHelper() is invoked as part of your AppBuilder initialization to activate the library’s functionality.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.UseViewHelper() // <- Add this line
.WithInterFont()
.LogToTrace();
License
MIT