AvaloniaLocator.Current is no longer accessible
See original GitHub issueDescribe the bug AvaloniaLocator was recently marked with the PrivateApi attribute and thus its no longer accessible from outside of the Avalonia projects.
To Reproduce Steps to reproduce the behavior:
- Try to access e.g.
AvaloniaLocator.Current.GetRequiredService<IAssetLoader>()
for e.g. loading assets dynamically - Observe that it’s no longer possible in 11.0.0 rc1.1 (was still working in 11.0.0 preview 8)
Expected behavior Either make it available again or offer a different way to access services created within Avalonia that are needed in user code.
Desktop (please complete the following information):
- OS: Windows 11, Linux (Raspberry Pi OS & custom image built with yocto)
Issue Analytics
- State:
- Created 4 months ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Avalonia 11 Porting Guide
The AvaloniaLocator is no longer available. Most services that were available via the locator now have alternative methods of access:.
Read more >Not all resources loading · Issue #5388 · AvaloniaUI/Avalonia
Describe the bug After including images as AvaloniaResource in a separate assembly, only 13 images and one AvaloniaResourceXamlInfo is ...
Read more >The View Locator
The View Locator. On this page you will learn how the view locator class that the solution template added to your project is...
Read more >AvaloniaUI: Dependency Injection
Hello, in this post I gonna explain how to use dependency injection in AvaloniaUI application and why is it so important.
Read more >Newest 'avalonia' Questions - Stack Overflow
AvaloniaLocator Current does not exists Linux. AvaloniaLocator.Current is not a public property and in the docs that I read they all use it....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@timkicker you need to swtich to 11.0 docs, see:
Resolve logo essa palhaçada ai