In a WPF application, I want to move UserControl from ContentControl to another code:
myContentControl2.Content = myUserControl;
in this case, I get an error:
The specified element is already a logical child of another element. Disable it first.
In the description of the ControlControl class, I see the RemoveVisualChild method , but when I try to use it in the code, I get an unknown method error
myContentControl1.RemoveVisualChild(myUserControl);
Where am I mistaken?
How to transfer UserControl from ContentControl to another in code?
source share