The WPF Grid Control is a content control that represents data in a flat columns and rows format where a row and a column may be managed independently. The Grid element in XAML represents a WPF Grid control. The following code snippet creates a Grid control, sets its width and foreground color and ensures the grid lines are visible.