UPDATE: im stiil working on this… some progress ( i can’t advise a path im just gong to report my progress and plan, and its not quite all working i think very close).
avalonia is very alluring or mabye parts of it:
theres avalon dockng, some script debugging, code completion, inspection and even stepping , tons of tooling out there… but too many forks forks, and general flux form me rght now… and i have years of legacy toolng code i doubt i can jsut replace it in a week or so.
for level editors using wpf with MG views underlays or windows or tabs:
mg 3.81 and wpf interop w net6 now works in basic samples. Its true wpf netcore is windows only ( for now , and i dont see a motive , except maybe nativie ARM windows support for Surface , for MIcrosfoft to put payrollled staff on it) it adds a differnt sdk Microsoft.NetCore.App and Microsfto.WindowsDesktop.App im not sure how dead it is but its in such widespread use i dont think it will be left behind, and there are overlapping new UI XAML frameworks and we dont know which of those they will kill off internally, or if avalonia or one of its forks, is the best way forward.
i pushed a PR to both https://github.com/craftworkgames/MonoGame.WpfCore and the https://github.com/MarcStan/monogame-framework-wpfinterop/pulls samples, to update to net6 and mg 3.81. But i might have not done it the simplest canonical way which might be using ANYCPU and the smallest possible project files. also these are breaking changes once u move to mg3.81 regarding 48 and netstandard2.0 ( if u have legacy wpf net 4.8 pieces, netstandard 2.0 with mg links) so they might not get merged but you can see the tiny changes i made. Netstandard 2.0 is pretty dead, so even if its supposed to work there are issues.
NOTES: updating non graphics, libs like physics engines or whatever, to from netstandard 2.0 to net 6 does obviously speed them up 20% or so. its worth it even if you dont think you have to. but you lose direct net 48 compatibility on parts linked to mg 3.81 so you have to on those… the windows compatibilty thing might get around some legacy net 48 ui you mght have… i think upgrade-assistant might introduce you to it , but as i said, it makes a mess.
So the samples that use Dxinterop work fine on windows 11 for me. but my remanng issue when I pull the Monogame.wpfcore content control into my level editor (wpf .48 not net6.windows) DX, i dont even step into the view model part that creates the render target thing…and i get a issue with window handle method not found excepting, something like htat. suspect is some issue with virtualization or the view model pattern or sharpdx/direct x bndng inssues.,… I remove teh SharpDX package nuget as its not needed, ( i think) same issue tho. So next i wll try the mark stan way…since its not using datacontext or view model and is more complete (antialiasing) … or some combination of the two.
As for Avalon id love to start using it so i can deploy a modding tool outside of windows on wndows GL or whatever , but I have not seen anyone produce a sample in the Avalon community and there are TONS of FORKS and tons of nauced ISSUES… its been tried a long time, they write to a bitmap, or try for the backing store… its a long , old , thread… But im not going back there also becasue the real WPF is very nuanced itself, and the netcore build (windows only) version is not showing me regression now, in legacy property sheets and docking and UI.
aslo Silk .NEt s is actively doing windows as i type so they might make the DX bindings on which both wpf - mG samples are built, but have abandoned for 2 years, obsolete. hte is SDL to watch, etc.
. so i decided not to go to avalonia but updating all my legacy docking and wpf controls to net6, and all my netstandard 2.0 to net 6… I don’t recommend the upgrade-assistant but it might give you clues if you have legacy pieces, lke the wndows compatibility thing, whch mght not even be needed… i made wpf net 6 lib projects form scratch istead from the templates n vs2022 preview.
I have devcomponets docking ( dead, but works fine) …CSScript for plugins now updated o rosyln, if you remove namespaces on any scripts, and , it is actively maintained…though the newest is not on nuget but hes built it. GitHub - oleg-shilo/cs-script.npp: CS-Script (C# Intellisense) plugin for Notepad++ (x86/x64)
now i use a sln that targets android, console desktop GL ( untested) and shared net 6 lib that has my game class, content w shaders, and windows DX app net 6… so my wpf class uses some of the draw code. problem is I added too many project configurations and all the permutations are too complex… so im trying ANYCPU and new projects … seeing if i can deploy on android and everything else at least while all the code churn from microsoft slows down. My test rigs are not tested on anything but windows, and a samsung phone and emulators… but they build shaders and run. there is no repeat code, just a link to the content.mgcb its basically the old netcore monogame sample with some rendertarget but its not clean or nice, i just dont have the time to push it yet.
ill update my public rig if i get a chance to tidy it up a bit.
So, my plan is stay on Windows wpf net6core, get my legacy code to work… fix the MG view since it works in the sample its should be possible , ( mark stan uses a Game class but I might merge some of his workarounds to the other one, which doesn’t not use a game class just a device service but has issues wiht tabbed dialogs and docking) to allow some user modding using Mrya or something later mabye if i actually want to deploy that , some games do better when there is a modding community. anyways sorry TLDR, i dont have the answers about Avalonia, im just sharing what ive decide to do because things are changing so fast in platform repos, i just want my tools to work as before with the new sdk and projects and all net6 for now while MSFT keeps blazing int this direction. sorry for the typos but im swamped with this for weeks.