Exemplo n.º 1
0
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            check_item null_item = new check_item();

            null_item.barcode        = "";
            null_item.status         = "";
            null_item.fixed_id       = 0;
            null_item.fixed_encoding = "";
            null_item.designation    = "";
            null_item.category       = "";
            null_item.specifications = "";
            null_item.model          = "";
            null_item.unit           = "";
            null_item.department     = "";
            null_item.keeper         = "";
            null_item.storage_place  = "";
            check_all.Add(null_item);


            // 不要在设计时加载数据。
            // if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
            // {
            //  //在此处加载数据并将结果指派给 CollectionViewSource。
            //  System.Windows.Data.CollectionViewSource myCollectionViewSource = (System.Windows.Data.CollectionViewSource)this.Resources["Resource Key for CollectionViewSource"];
            //  myCollectionViewSource.Source = your data
            // }
        }
Exemplo n.º 2
0
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            check_item null_item = new check_item();
            null_item.barcode = "";
            null_item.status = "";
            null_item.fixed_id = 0;
            null_item.fixed_encoding = "";
            null_item.designation = "";
            null_item.category = "";
            null_item.specifications = "";
            null_item.model = "";
            null_item.unit = "";
            null_item.department = "";
            null_item.keeper = "";
            null_item.storage_place = "";
            check_all.Add(null_item);

       
            // 不要在设计时加载数据。
            // if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
            // {
            // 	//在此处加载数据并将结果指派给 CollectionViewSource。
            // 	System.Windows.Data.CollectionViewSource myCollectionViewSource = (System.Windows.Data.CollectionViewSource)this.Resources["Resource Key for CollectionViewSource"];
            // 	myCollectionViewSource.Source = your data
            // }
        }