private void AddMetadata(IContainsMetadata item) { this.MetadataList.AddRange(MetadataPropertyUtils.GetPropertyList(item)); foreach (MetadataProperty property in item.CustomProperties) { this.MetadataList.Add(property); } }
public MetadataHandler(IContainsMetadata item, ObservableCollection <MetadataProperty> properties) { this.Item = item ?? throw new ArgumentNullException("item is null"); this.MetadataList = new ObservableCollection <MetadataProperty>(); AddMetadata(this.Item); AddMetadata(properties); this.MetadataCollection = new ListCollectionView(this.MetadataList); this.MetadataCollection.GroupDescriptions.Add(new PropertyGroupDescription("Type")); this.SelectedMetadata.PropertyChanged += SelectedMetadataChanged; this.AddCustomMetaDataCommand = new DelegateCommand(() => AddNewCustomProperty()); this.RemoveCustomMetadataCommand = new DelegateCommand(() => RemoveCustomProperty()); this.MoveMetadataUpCommand = new DelegateCommand(() => MoveCurrentMetadataUp()); this.MoveMetadataDownCommand = new DelegateCommand(() => MoveCurrentMetadataDown()); }
public MetadataHandler(IContainsMetadata item) : this(item, new ObservableCollection <MetadataProperty>()) { }