[WIP] AvaloniaUI support
This look interesting, I will try and a review it once I get an hour or two of free time.
Could you add a sample AvaloniaUI app to the samples also?
Could you add a sample AvaloniaUI app to the samples also?
Done.
I'm not sure where it would be ideal to start the CM bootstrapper. Now it's created in App.OnFrameworkInitializationCompleted() in App.axaml.cs. Another solution might be to include it as a resource in App.axaml like in WPF.
Should we namespace this similarly to the Xamarin.Forms package? I don’t think we can determine whether or not a project uses Avalonia otherwise.
I agree we need an Avalonia package similar to the xamarin.forms
Also I think this was made before we reintroduced the Xamarin.Forms package so the branch needs to be rebased and the Caliburn.Micro.Platform.Core should be referenced as it is for the Xamarin.Forms package and the regular Caliburn.Micro package.
What are the steps left to have this into Caliburn? It looks like it works but we need some restructuring? I could help some but am not sure where in the process we are atm.
will work on fixing merge conflicts and see if we can get it merged in this weekend. It will need testing
I tried a while back to include Avalonia in the features sample project, and ran into some issues with the way navigation was handled via frame adapter. I think if we can make it work with the features sample project it will be a good test.
~I rebased this PR on the latest Caliburn master and was planning to move this forward a bit, but ran into some issues. It happens to be that the project I was using it in did not actually use Caliburn for navigation (I called ViewLocator and ViewModelBinder manually). Today I tried to use Conductor<T>.ActivateItemAsync like you should. However I found that it does not try to find a view. Am I missing something here or is this the navigation problem @KasperSK is talking about? There is nothing wrong with naming conventions, it does not call the ViewLocator at all.~
It was my fault. Ignore it.
Created a branch of my own to keep working on this. https://github.com/Caliburn-Micro/Caliburn.Micro/tree/556-compatibility-inquiry-avaloniaui The biggest issue I have remaining is getting
cal:Message.Attach="RegisterFrame($source)"
events to fire.
Created a branch of my own to keep working on this. https://github.com/Caliburn-Micro/Caliburn.Micro/tree/556-compatibility-inquiry-avaloniaui The biggest issue I have remaining is getting
cal:Message.Attach="RegisterFrame($source)"events to fire.
~I have a fix/improvement, shall I make a pull request to your branch or how will we coordinate this?~ Made a PR.
@megazyz and all! I am from Avalonia! I would like to help resurrect this PR.
@megazyz how complete is this?
@megazyz and all! I am from Avalonia! I would like to help resurrect this PR.
@megazyz how complete is this?
@vb2ae I have seen your branch, testing it out! Would love to help get it finished. Let me know of how I can assist. For now I shall test it out find my way around!
The latest Avalonia nightlies have some breaking changes. Luckily they are focussing on bug fixes for the upcoming version from now on so I don't expect more breaking stuff to be added.
One has to do with different parameters in InitializeComponent which is called through reflection by Caliburn. I have a fix for this locally that I'll create a PR for. One other issue has to do with registering event triggers, not sure exactly what is the cause there.
Then we need to also rebase this branch on master because I am sure there are some conflicts. Some other thing might still be missing that I don't encounter in my project, @vb2ae has more details about them I think.
I apologize for my absence. Thank you for looking into this and continuing the development.
@megazyz you do this in your free time so no apologies needed mate