Example #1
0
 private void AddMetadata(IContainsMetadata item)
 {
     this.MetadataList.AddRange(MetadataPropertyUtils.GetPropertyList(item));
     foreach (MetadataProperty property in item.CustomProperties)
     {
         this.MetadataList.Add(property);
     }
 }
Example #2
0
        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());
        }
Example #3
0
 public MetadataHandler(IContainsMetadata item)
     : this(item, new ObservableCollection <MetadataProperty>())
 {
 }