Inheritance: System.Windows.Controls.UserControl
コード例 #1
0
 public void Add_Multiple_Items(AutoGridTestControl control)
 {
     for (int i = 0; i < 15; i++)
     {
         Add_Item(control);
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void Set_Heights(AutoGridTestControl control)
 {
     var grid = control.AutoGrid;
     grid.RowHeight = new GridLength(20);
 }
コード例 #4
0
 public void Remove_Item(AutoGridTestControl control)
 {
     if (collection.Count == 0) return;
     collection.RemoveAt(0);
     Write(control);
 }
コード例 #5
0
 public void Add_Item_After_First(AutoGridTestControl control)
 {
     var index = collection.Count == 0 ? 0 : 1;
     collection.Insert(index, SampleModel.Create());
     Write(control);
 }
コード例 #6
0
 public void Add_Item(AutoGridTestControl control)
 {
     collection.Add(SampleModel.Create());
     Write(control);
 }
コード例 #7
0
 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("");
 }