コード例 #1
0
        /// <summary>
        /// Add a DataBindingItem to the collection
        /// </summary>
        /// <param name="index"></param>
        /// <param name="Item"></param>
        public void AddAt(int index, DataBindingItem Item)
        {
            if (_ParentDataBinder != null)
            {
                Item.Page   = _ParentDataBinder.Page;
                Item.Binder = _ParentDataBinder;

                // VS Designer adds new items as soon as their accessed
                // but items may not be valid so we have to clean up
                if (_ParentDataBinder.DesignMode)
                {
                    UpdateListInDesignMode();
                }
            }

            InnerList.Insert(index, Item);
        }
コード例 #2
0
        /// <summary>
        /// Add a DataBindingItem to the collection
        /// </summary>
        /// <param name="Item"></param>
        public void Add(DataBindingItem Item)
        {
            if (_ParentDataBinder != null)
            {
                Item.Page   = _ParentDataBinder.Page;
                Item.Binder = _ParentDataBinder;

                // VS Designer adds new items as soon as their accessed
                // but items may not be valid so we have to clean up
                if (_ParentDataBinder.DesignMode)
                {
                    // Remove any blank items
                    UpdateListInDesignMode();
                }
            }

            InnerList.Add(Item);
        }