--- title: "How to: Make Sure That a GridSplitter Is Visible" ms.date: "03/30/2017" helpviewer_keywords: - "GridSplitter control [WPF], ensuring visibility of" ms.assetid: 0a62a964-89c8-48f0-9023-5df721a8cf47 --- # How to: Make Sure That a GridSplitter Is Visible This example shows how to make sure a control is not hidden by the other controls in a . ## Example The of a control are rendered in the order that they are defined in markup or code. controls can be hidden by other controls if you do not define them as the last elements in the collection or if you give other controls a higher . To prevent hidden controls, do one of the following. - Make sure that controls are the last added to the . The following example shows the as the last element in the collection of the . [!code-xaml[GridSplitterSnips#GridSplitterLastChild](~/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterSnips/CSharp/Window1.xaml#gridsplitterlastchild)] - Set the on the to be higher than a control that would otherwise hide it. The following example gives the control a higher than the control. [!code-xaml[GridSplitterSnips#GridSplitterZIndex](~/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterSnips/CSharp/Window1.xaml#gridsplitterzindex)] - Set margins on the control that would otherwise hide the so that the is exposed. The following example sets margins on a control that would otherwise overlay and hide the . [!code-xaml[GridSplitterSnips#GridSplitterMargin](~/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterSnips/CSharp/Window1.xaml#gridsplittermargin)] ## See also - - [How-to Topics](gridsplitter-how-to-topics.md)