private void UpdateRowHeaders() { RowHeaders.Clear(); foreach (var rowHeaderViewModel in GenRows(SelectedMcu)) { RowHeaders.Add(rowHeaderViewModel); } }
private void Button_Click(object sender, RoutedEventArgs e) { var random = new Random(); var row = random.Next(50, 100); var col = random.Next(50, 100); RowHeaders.Clear(); Enumerable.Range(0, row).ToList() .ForEach(r => RowHeaders.Add($"R{r}")); ColumnHeaders.Clear(); Enumerable.Range(0, col).ToList() .ForEach(c => ColumnHeaders.Add($"C{c}")); Items.Clear(); RowHeaders.ToList() .ForEach(r => Items.Add(new ObservableCollection <string>(ColumnHeaders.Select(c => $"{c}-{r}")))); }
public void Reset() { cells = null; if (RowHeaders == null) { RowHeaders = new List <double>(); } else { RowHeaders.Clear(); } if (ColumnHeaders == null) { ColumnHeaders = new List <double>(); } else { ColumnHeaders.Clear(); } }