--- title: "How to: Resize Rows with a GridSplitter" ms.date: "03/30/2017" helpviewer_keywords: - "resizing grid rows [WPF]" - "grid rows [WPF], resizing" - "GridSplitter control [WPF], resizing grid rows" ms.assetid: 2413a9f2-1d81-46ed-95cb-95ec8233eea2 --- # How to: Resize Rows with a GridSplitter This example shows how to use a horizontal to redistribute the space between two rows in a without changing the dimensions of the . ## Example **How to create a GridSplitter that overlays the edge of a row** To specify a that resizes adjacent rows in a , set the attached property to one of the rows that you want to resize. If your has more than one column, set the attached property to specify the number of columns. Then set the to or (which alignment you set depends on which two rows you want to resize). Finally, set the property to . The following example shows how to define a horizontal that resizes adjacent rows. [!code-xaml[GridSplitterRowColumn#GridSplitterRowOverlay](~/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterRowColumn/CS/Window1.xaml#gridsplitterrowoverlay)] A that does not occupy its own row may be obscured by other controls in the . For more information about how to prevent this issue, see [Make Sure That a GridSplitter Is Visible](how-to-make-sure-that-a-gridsplitter-is-visible.md). **How to create a GridSplitter that occupies a row** To specify a that occupies a row in a , set the attached property to one of the rows that you want to resize. If your has more than one column, set the attached property to the number of columns. Then set the to , set the property to , and set the of the row that contains the to . The following example shows how to define a horizontal that occupies a row and resizes the rows on either side of it. [!code-xaml[GridSplitterRowColumn#GridSplitterEntireRowPart1](~/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterRowColumn/CS/Window1.xaml#gridsplitterentirerowpart1)] [!code-xaml[GridSplitterRowColumn#GridSplitterEntireRowPart2](~/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterRowColumn/CS/Window1.xaml#gridsplitterentirerowpart2)] ## See also - - [How-to Topics](gridsplitter-how-to-topics.md)