public void Add_Multiple_Items(AutoGridTestControl control) { for (int i = 0; i < 15; i++) { Add_Item(control); } }
public void Initialize(AutoGridTestControl control) { var grid = control.AutoGrid; grid.Width = 400; grid.Height = 300; grid.Background = StyleResources.Colors["Brush.Black.010"] as Brush; collection = new ObservableCollection<SampleModel>(); grid.ItemsSource = collection; Add_Item(control); Add_Item(control); Add_Item(control); }
public void Set_Heights(AutoGridTestControl control) { var grid = control.AutoGrid; grid.RowHeight = new GridLength(20); }
public void Remove_Item(AutoGridTestControl control) { if (collection.Count == 0) return; collection.RemoveAt(0); Write(control); }
public void Add_Item_After_First(AutoGridTestControl control) { var index = collection.Count == 0 ? 0 : 1; collection.Insert(index, SampleModel.Create()); Write(control); }
public void Add_Item(AutoGridTestControl control) { collection.Add(SampleModel.Create()); Write(control); }
private static void Write(AutoGridTestControl control) { var grid = control.AutoGrid; Debug.WriteLine("RowDefinitions.Count: " + grid.RowDefinitions.Count + " | ColumnDefinitions.Count: " + grid.ColumnDefinitions.Count); Debug.WriteLine("grid.Children.Count: " + grid.Children.Count); Debug.WriteLine(""); }