VS 2022 - Root Element is not valid - WPF
So upon trying to get a TextBlock to read across all pages, i somehow ended up with this error. And cand figure out where its coming from.


8 Replies

Mind sending the XAML?
$paste
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
So upon trying to get a TextBlock to read across all pages,Use MVVM and Dependency Injection, it's more advanced but it's just what you need. Oh my. Remember this. $rulesofwpf
Specifically this
❌ Avoid the WPF Designer to eliminate a category of confusing bugs
Source="MainWindow.xaml"
This was it, I forgot to remove this part from the guide i followed thta didnt work.