In above code, you can see we have apply the name of the Grid control to myGrid. The controls will be added to the Grid control from your code-behind file. Therefore, open the MainWindow.xaml.cs file and add code shown in below code.