示例#1
0
 protected FrameworkElement GenerateCustomEditingElement(Type definitionKey, PropertyItemBase propertyItem)
 {
     return(PropertyContainer.EditorDefinitions is not null
         ? CreateCustomEditor(PropertyContainer.EditorDefinitions.GetRecursiveBaseTypes(definitionKey),
                              propertyItem)
         : null);
 }
示例#2
0
        public virtual void PrepareChildrenPropertyItem(PropertyItemBase propertyItem, object item)
        {
            // Initialize the parent node
            propertyItem.ParentNode = PropertyContainer;

            PropertyGrid.RaisePreparePropertyItemEvent((UIElement)PropertyContainer, propertyItem, item);
        }
        public override object ItemFromContainer(PropertyItemBase container)
        {
            // Since this call is only used to update the PropertyGrid.SelectedProperty property,
            // return the PropertyName.
            var propertyItem = container as PropertyItem;

            if (propertyItem is null)
            {
                return(null);
            }

            return(propertyItem.PropertyDescriptor.Name);
        }
示例#4
0
        public virtual void ClearChildrenPropertyItem(PropertyItemBase propertyItem, object item)
        {
            propertyItem.ParentNode = null;

            PropertyGrid.RaiseClearPropertyItemEvent((UIElement)PropertyContainer, propertyItem, item);
        }
示例#5
0
 public abstract object ItemFromContainer(PropertyItemBase container);
示例#6
0
 public abstract Binding CreateChildrenDefaultBinding(PropertyItemBase propertyItem);
示例#7
0
 protected FrameworkElement CreateCustomEditor(EditorDefinitionBase customEditor, PropertyItemBase propertyItem)
 {
     return(customEditor is not null
         ? customEditor.GenerateEditingElementInternal(propertyItem)
         : null);
 }
示例#8
0
 protected FrameworkElement GenerateCustomEditingElement(object definitionKey, PropertyItemBase propertyItem)
 {
     return(PropertyContainer.EditorDefinitions is not null
         ? CreateCustomEditor(PropertyContainer.EditorDefinitions[definitionKey], propertyItem)
         : null);
 }
示例#9
0
 protected virtual FrameworkElement GenerateEditingElement(PropertyItemBase propertyItem)
 {
     return(null);
 }
示例#10
0
 internal FrameworkElement GenerateEditingElementInternal(PropertyItemBase propertyItem)
 {
     return(GenerateEditingElement(propertyItem));
 }
 protected sealed override FrameworkElement GenerateEditingElement(PropertyItemBase propertyItem)
 {
     return(EditingTemplate is not null
         ? EditingTemplate.LoadContent() as FrameworkElement
         : null);
 }