int indx = Grid.GetRow(sender as Button); int row = layOut.RowDefinitions.Count; List<UIElement> elementsToRemove = new List<UIElement>(); foreach (UIElement element in layOut.Children) { var d = Grid.GetRow(element); if (Grid.GetRow(element) == Grid.GetRow(sender as Button)) elementsToRemove.Add(element); } foreach (UIElement element in elementsToRemove) layOut.Children.Remove(element); layOut.RowDefinitions.RemoveAt(indx-1);
indx-1
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)