This error occurs: - System.InvalidOperationException: 'Window must be the root of the tree. Cannot add Window as a child of Visual.' I want to open another WPF window inside the stack panel. If WPF window can't open, then give some other good option.
private ObjectPlacement objectPlacement;
private void Button_Click_4(object sender, RoutedEventArgs e)
ObjectPlacement W = new ObjectPlacement();// other WPF window
settingpanel.Children.Add(objectPlacement);//setting panel is stack panel.
private void Object_placement_Click(object sender, RoutedEventArgs e)
UserControl1 newFormControl = new UserControl1();
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)