Interestingly enough, in practice, there are various declarative SwiftUI-style nuget packages for Avalonia[0][1][2] and Uno[3]. You don't actually have to touch XML if you don't want to.
Edit: as someone else noted, the website itself links to a built-in option to do so as well - https://platform.uno/c-markup/
I agree. It's just quite a lot of verbose-looking XML. "I have to write that much XML" is probably not the first impression you want to give. I did scroll down and see that you don't actually have to write such XML by hand, but many will not.