コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PropertyItem"/> class.
        /// </summary>
        public PropertyItem(PropertyDescriptor property, object instance)
        {
            Property = property;
            Instance = instance;

            ResetCommand        = new Command <object>(ResetValue, CanResetValue);
            EditBindingCommand  = new Command <object>(ShowBindingEditor, o => !property.IsReadOnly);
            EditResourceCommand = new Command <object>(ShowResourceEditor, o => !property.IsReadOnly);

            _propertySortInfo = PropertySorter.GetSortInfo(property);
            _markupObject     = MarkupWriter.GetMarkupObjectFor(Instance);

            property.AddValueChanged(instance, OnValueChanged);

            _dpd = DependencyPropertyDescriptor.FromProperty(property);
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PropertyItem"/> class.
        /// </summary>
        public PropertyItem(PropertyDescriptor property, object instance)
        {
            Property = property;
            Instance = instance;

            ResetCommand = new Command<object>(ResetValue, CanResetValue);
            EditBindingCommand = new Command<object>(ShowBindingEditor, o => !property.IsReadOnly);
            EditResourceCommand = new Command<object>(ShowResourceEditor, o => !property.IsReadOnly);

            _propertySortInfo = PropertySorter.GetSortInfo(property);
            _markupObject = MarkupWriter.GetMarkupObjectFor(Instance);

            property.AddValueChanged(instance, OnValueChanged);

            _dpd = DependencyPropertyDescriptor.FromProperty(property);
        }