/// <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); }
/// <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); }