示例#1
0
        private void CategoryContainer_Loaded(object sender, RoutedEventArgs e)
        {
            IPropertyInspector propertyInspectorModel = PropertyInspectorHelper.GetOwningPropertyInspectorModel((DependencyObject)this);

            if (propertyInspectorModel == null || CategoryContainer.GetPopupHost((DependencyObject)this) != null)
            {
                return;
            }
            this.Category.Expanded = propertyInspectorModel.IsCategoryExpanded(this.Category.get_CategoryName());
        }
示例#2
0
 public CollectionDialogEditor(CollectionDialogEditorModel model)
 {
     this.model      = model;
     this.model.Host = this;
     PropertyInspectorHelper.SetOwningPropertyInspectorElement((DependencyObject)this, (UIElement)this);
     PropertyInspectorHelper.SetOwningPropertyInspectorModel((DependencyObject)this, (IPropertyInspector)model);
     this.quickTypeCollection         = new ObservableCollection <NewItemFactoryTypeModel>();
     this.quickTypes                  = CollectionViewSource.GetDefaultView(this.quickTypeCollection);
     this.addItemCommand              = new DelegateCommand(new DelegateCommand.SimpleEventHandler(this.AddNewItem));
     this.removeItemCommand           = new DelegateCommand(new DelegateCommand.SimpleEventHandler(this.RemoveItem));
     this.removeItemCommand.IsEnabled = false;
     this.moveUpCommand               = new DelegateCommand(new DelegateCommand.SimpleEventHandler(this.MoveUp));
     this.moveUpCommand.IsEnabled     = false;
     this.moveDownCommand             = new DelegateCommand(new DelegateCommand.SimpleEventHandler(this.MoveDown));
     this.moveDownCommand.IsEnabled   = false;
     this.SetValue(DesignerProperties.IsInDesignModeProperty, (object)false);
     this.Unloaded += new RoutedEventHandler(this.CollectionDialogEditor_Unloaded);
 }