public TypeCategoryTreeViewItemViewModel(Authentication authentication, TypeCategoryDescriptor descriptor, object owner)
     : base(authentication, descriptor, owner)
 {
     this.renameCommand = new DelegateCommand(async item => await this.RenameAsync(), item => this.CanRename);
     this.deleteCommand = new DelegateCommand(async item => await this.DeleteAsync(), item => this.CanDelete);
     this.Owner         = owner;
 }
Exemplo n.º 2
0
        public TypeCategoryTreeViewItemViewModel(Authentication authentication, TypeCategoryDescriptor descriptor)
        {
            this.authentication = authentication;
            this.descriptor     = descriptor;

            foreach (var item in descriptor.Categories)
            {
                var viewModel = new TypeCategoryTreeViewItemViewModel(authentication, item)
                {
                    Parent = this
                };
            }

            foreach (var item in descriptor.Types)
            {
                var viewModel = new TypeTreeViewItemViewModel(authentication, item)
                {
                    Parent = this
                };
            }
        }
 public TypeCategoryTreeViewItemViewModel(Authentication authentication, TypeCategoryDescriptor descriptor)
     : this(authentication, descriptor, null)
 {
 }
 protected override TypeCategoryTreeItemBase CreateInstance(Authentication authentication, TypeCategoryDescriptor descriptor, object owner)
 {
     return(new TypeCategoryTreeViewItemViewModel(authentication, descriptor, owner));
 }