'What is the code-behind equivalence of XAML <DataGrid Name="myDataGrid"/>?

Can I add WPF items programmatically without any manual interference with XAML? Please give me a hand.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source