Ejemplo n.º 1
0
        private void Button_Add_Click(object sender, RoutedEventArgs e)
        {
            int number = MyData.Items.Count;

            if (CDataGridList == null)
            {
                CDataGridList         = new ObservableCollection <CDataGrid>();
                MyData.ItemsSource    = CDataGridList;
                MyData.CanUserAddRows = false;
            }
            CDataGridList.Add(new CDataGrid()
            {
                Numeration = number, Category = Category.Scheta, Date = DateTime.UtcNow
            });
            number++;
        }