This is just an assumption, since you did not provide a lot of information, but I noticed the following problem, which may be the culprit.
In your first code snippet, you seem to create an employee from MainForm:
Dim Empl As New Employee MainGrid.Children.Add(Empl) Grid.SetRow(Empl, 1)
Your next comment seems to confirm this assumption:
This is a Window_Loaded event. The menu is User Control, and I have several buttons for opening and managing other user controls. When I click, for example, the Question button
And yet, in the Employee class, you create a new instance of MainWindow and add data to it:
Public Class Employee Dim mw As New MainWindow Private Sub btnQuestionAdd_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles btnQuestionAdd.Click Dim Que As New QuestionAdd mw.MainGrid.Children.Add(Que) Grid.SetRow(Que, 2) Grid.SetColumn(Que, 1) End Sub End Class
If this observation is true, then I think you need to go back to books and understand the concept of classes and instances .
You essentially created a second form (which is hidden because you never show it explicitly), and then change that second form, not the original. To prove this hypothesis, try adding the following line of code:
Public Class Employee Dim mw As New MainWindow Private Sub btnQuestionAdd_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles btnQuestionAdd.Click Dim Que As New QuestionAdd mw.MainGrid.Children.Add(Que) Grid.SetRow(Que, 2) Grid.SetColumn(Que, 1) mw.Show() ' <--- End Sub End Class
A second form will probably appear with all the changes you expected in your first form.
As for how to fix this, the easiest way is to add a parameter to your initializer ("Sub New"), which takes MainForm as a value. Then you can assign a value to the field or property (perhaps only to your mw field) and continue on your fun path. However, this will give you headaches, so maybe it's time to start learning more about the software architecture , especially in the concept of separation of problems .