So I realize this is an often-asked about error, and I've read many results from google, but I still can't figure out how it applies to my situation.
The setup: I create a window to present views. I create an instance of the first view and set the window's Content property to the view. Currently each of my views is a window itself. This is working perfectly on 7/10 computers. However, for some reason on a few computers (verified correct .NET version), switching to the second view (creating an instance of the second view and setting the window's Content property to the second view) throws a System.InvalidOperationException Specified element is already the logical child of another element. Disconnect it first.
I read that using ContentTemplate instead of Content would solve the problem, but that just produces a blank screen instead of the second view (I'm sure I'm doing that wrong).
I've also read that you should use a UserControl instead of a Window as the Window's Content property, so I'm trying that (I don't have a computer that's getting this error, so I have to wait to hear back about success). But it seems to me that that won't really change anything.
Any ideas why this is only happening on some computers, and any ideas on how to fix it?
Edit: Changing the views to UserControls did not solve the issue
Edit: I realized that I misspoke. I don't set the Content of the main window to a Window, I set it to the second Window's Content. So like:
MainWindow.Content = nextScreen.Content;