In Visual Studio 2022, I can create a WPF form in my C# Project (Masterclass.Revit.2023) but when I copy or move it to my Shared Project within the same solution it splits the .xaml into two separate files and the window is no longer visible. What I mean is the .cs file is no longer a subfile of the .xaml file, they are seen as two separate files. Furthermore, when I was following Konrad Sobon in a youtube video @ timestamp (2:37:17 video link is below) he can do it just fine and when I clone his file from GitHub it works just fine.
BadMoneys|AEC Tech 2021 https://www.youtube.com/watch?v=iS_d90bq6k0&t=7687s
Cloned File https://github.com/TheBIMsider/Masterclass
I tried creating the WPF user control form from my Shared Project its still spilts it into two files and as I said before I can create it in a C# Project it works like it should and the .cs file is a sub file of the .xaml file.
How can I get this form to be visible inside my Shared Project and the .cs file be a subfile of the .xaml file?