            foreach (KeyValuePair<RowDefinition, int> rowDefinitionPair in rowDefinitions)
            {
                GridSplitter gridSplitter = new GridSplitter();
                gridSplitter.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                gridSplitter.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                Grid.SetRow(gridSplitter, rowDefinitionPair.Value);
                Grid.SetColumnSpan(gridSplitter, grid.ColumnDefinitions.Count);
                gridSplitter.ResizeBehavior = GridResizeBehavior.PreviousAndNext;
                gridSplitter.ResizeDirection = GridResizeDirection.Rows;
                gridSplitter.Height = 5;