void gd_Click(object sender, RoutedEventArgs e) { Options.GameDirectory gd = sender as Options.GameDirectory; spGameList.Children.Remove(gd); gdListRow.Height = new GridLength(spGameList.Children.Count * 30); }
void addDirectory(String dir) { Options.GameDirectory gd = new Options.GameDirectory(dir); gd.Click += new RoutedEventHandler(gd_Click); spGameList.Children.Add(gd); gdListRow.Height = new GridLength(spGameList.Children.Count * 30); }