Caliburn-Micro / Caliburn.Micro

A small, yet powerful framework, designed for building applications across all XAML platforms. Its strong support for MV* patterns will enable you to build your solution quickly, without the need to sacrifice code quality or testability.
http://caliburnmicro.com/
MIT License
2.8k stars 778 forks source link

WIP: Update Avalonia support #846

Closed danwalmsley closed 1 year ago

danwalmsley commented 1 year ago

@vb2ae I am from the Avalonia UI team! This PR targets your exising branch:

  1. merges in master latest changed.
  2. I have removed the need for ReactiveUI as your sample shouldnt depend on another mvvm framework (maybe I miss understood the need for reactiveui, let me know if this is a mistake)

Im continuing to test so I may add other fixes, and I will also test with latest upstream changes from Avalonia.

Stannieman commented 1 year ago

@danwalmsley FYI you might run into this at some point https://github.com/Caliburn-Micro/Caliburn.Micro/pull/847

Feel free to take it

danwalmsley commented 1 year ago

@danwalmsley FYI you might run into this at some point #847

Feel free to take it

I'll take a look!

danwalmsley commented 1 year ago

@danwalmsley FYI you might run into this at some point #847 Feel free to take it

I'll take a look!

@Stannieman do you guys have some chat room or way I can contact you guys? Might smooth communication

Stannieman commented 1 year ago

@danwalmsley FYI you might run into this at some point #847 Feel free to take it

I'll take a look!

@Stannieman do you guys have some chat room or way I can contact you guys? Might smooth communication

Not that I know of. But I am also just a random guy that helps a hand with Avalonia related stuf from time to time because I happen to use this combo in an app. Maybe the core Caliburn team has some chat.

danwalmsley commented 1 year ago

@Stannieman I fixed the issue you pointed out with: https://github.com/Caliburn-Micro/Caliburn.Micro/pull/846/commits/74bc7f8ba2e9c01c01dad24a3cb7abdfc6e09b9c

I think that is the correct fix, but im also not an expert in Caliburn.

I think that should unblock any other work that is ongoing on avalonia.

Stannieman commented 1 year ago

If it is fine that InitializeComponent is not called then yes. But I guess that the default constructor calls it in Avalonia?

danwalmsley commented 1 year ago

If it is fine that InitializeComponent is not called then yes. But I guess that the default constructor calls it in Avalonia?

Yes it does!

danwalmsley commented 1 year ago

@Stannieman are you on the avalonia telegram group? I am having trouble getting the normal Feature.Netcore project to build.

https://caliburn-micro.visualstudio.com/caliburn-micro/_build/results?buildId=565&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=b1657ed2-8cf9-53e1-bfff-c661b553db41

Stannieman commented 1 year ago

Not in that group. But I think you can remove this failing project from the solution as it does not exist in the repo. Likely a leftover from someone testing things that got merged.

danwalmsley commented 1 year ago

@Stannieman I posted the wrong build:

https://caliburn-micro.visualstudio.com/caliburn-micro/_build/results?buildId=570&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=4b3c94ee-c80a-5ef5-daaf-a017ad9cae9a

image

Stannieman commented 1 year ago

Hmm not sure. It builds for me without touching the code. You could try changing the URL to http://www.caliburnproject.org which I think is more correct, but again for me it works without that.

vb2ae commented 1 year ago

@danwalmsley I was playing with reactive ui for navigation but removed it on my local. I will look at the dotnet sample.

Stannieman commented 1 year ago

If it is fine that InitializeComponent is not called then yes. But I guess that the default constructor calls it in Avalonia?

Yes it does!

@danwalmsley For me this does not work. I either have to call InitializeComponent from constructor in code behind or call it in ViewLocator. Otherwise my views stay blank. Also in Avalonia examples I still see that it is called explicitly. Am I missing something here?