Пример #1
0
        /*
         * // Existing known properties
         * private string _firstName;
         * private string _lastName;
         *
         * public string FirstName
         * {
         * get { return _firstName; }
         * set { _firstName = value; RaisePropertyChanged(); }
         * }
         *
         * public string LastName
         * {
         * get { return _lastName; }
         * set { _lastName = value; RaisePropertyChanged(); }
         * }
         */
        #endregion


        public Item(BaseItemsViewModel vmItems)
        {
            _vmItems = vmItems;
            _schema  = vmItems.Schema;
            _values  = new ItemValues(vmItems);

            _values.PropertyChanged += (s, e) => PropertyChanged(this, e);
        }
Пример #2
0
        public ItemValues(BaseItemsViewModel vmItems)
        {
            _schema = vmItems.Schema;

            foreach (var property in _schema.GetCustomType().GetProperties())
            {
                ItemAttribute newValue = new ItemAttribute(property.Name, null);
                _valuesDictionary.Add(property.Name, newValue);
                _valuesCollection.Add(newValue);
            }
        }