PropertyGridItemAdapter Class
Provides an abstract base class for a TreeListBoxItemAdapter that can be used in a PropertyGrid.
public class PropertyGridItemAdapter : TreeListBoxItemAdapter
- Inheritance:
- object TreeListBoxItemAdapter object
Constructors
PropertyGridItemAdapter()
Initializes an instance of the class.
public PropertyGridItemAdapter()
Methods
GetChildren(TreeListBox, object)
Returns an IEnumerable that will be used to provide child items for the specified parent item.
public override IEnumerable? GetChildren(TreeListBox ownerControl, object item)
| Parameter | Type | Description |
|---|---|---|
| ownerControl | TreeListBox | The owner control. |
| item | object | The item to examine. |
Returns
Remarks
The ChildrenBinding property can be set for a pure XAML-based implementation of this method. Please note that bindings aren't as performant as code, so for large trees or if you see performance issues, it is recommended to override this method instead with custom logic to retrieve the appropriate value.
GetIndentAmount(TreeListBox, object, int)
Returns the indent amount of the specified item.
public override double GetIndentAmount(TreeListBox ownerControl, object item, int depth)
| Parameter | Type | Description |
|---|---|---|
| ownerControl | TreeListBox | The owner control. |
| item | object | The item to examine. |
| depth | int | The item depth. |
Returns
GetIsExpanded(TreeListBox, object)
Returns whether the specified item is expanded.
public override bool GetIsExpanded(TreeListBox ownerControl, object item)
| Parameter | Type | Description |
|---|---|---|
| ownerControl | TreeListBox | The owner control. |
| item | object | The item to examine. |
Returns
- bool:
trueif the specified item is expanded; otherwise,false.
Remarks
The IsExpandedBinding binding property can be set for a pure XAML-based implementation of this method. Please note that bindings aren't as performant as code, so for large trees or if you see performance issues, it is recommended to override this method instead with custom logic to retrieve the appropriate value. The IsExpandedDefault property can also be set (if IsExpandedBinding is not used) to designate the default return value of this method, and that can be set in XAML.
GetIsSelected(TreeListBox, object)
Returns whether the specified item is selected.
public override bool GetIsSelected(TreeListBox ownerControl, object item)
| Parameter | Type | Description |
|---|---|---|
| ownerControl | TreeListBox | The owner control. |
| item | object | The item to examine. |
Returns
- bool:
trueif the specified item is selected; otherwise,false.
Remarks
The IsSelectedBinding binding property can be set for a pure XAML-based implementation of this method. Please note that bindings aren't as performant as code, so for large trees or if you see performance issues, it is recommended to override this method instead with custom logic to retrieve the appropriate value.
GetPath(TreeListBox, object)
Returns the item's string path, relative to its parent.
public override string? GetPath(TreeListBox ownerControl, object item)
| Parameter | Type | Description |
|---|---|---|
| ownerControl | TreeListBox | The owner control. |
| item | object | The item to examine. |
Returns
- string:
The item's string path, relative to its parent.
Remarks
The PathBinding property can be set for a pure XAML-based implementation of this method. Please note that bindings aren't as performant as code, so for large trees or if you see performance issues, it is recommended to override this method instead with custom logic to retrieve the appropriate value.
InitializeDataObjectWithDisplayName(PropertyGrid, IDataObject, IDataModel)
Initializes an IDataObject with the display name of the specified IDataModel.
public virtual bool InitializeDataObjectWithDisplayName(PropertyGrid sourceControl, IDataObject dataObject, IDataModel model)
| Parameter | Type | Description |
|---|---|---|
| sourceControl | PropertyGrid | The source control that contains the IDataModel. |
| dataObject | IDataObject | The IDataObject to initialize. |
| model | IDataModel | The IDataModel to examine. |
Returns
- bool:
trueif the IDataObject was initialized; otherwise,false.
InitializeDataObjectWithPropertyValue(PropertyGrid, IDataObject, IPropertyModel)
Initializes a IDataObject with the value of the specified IPropertyModel.
public virtual bool InitializeDataObjectWithPropertyValue(PropertyGrid sourceControl, IDataObject dataObject, IPropertyModel propertyModel)
| Parameter | Type | Description |
|---|---|---|
| sourceControl | PropertyGrid | The source control that contains the IPropertyModel. |
| dataObject | IDataObject | The IDataObject to initialize. |
| propertyModel | IPropertyModel | The IPropertyModel to examine. |
Returns
- bool:
trueif the IDataObject was initialized; otherwise,false.
SetIsExpanded(TreeListBox, object, bool)
Sets whether the specified item is expanded.
public override void SetIsExpanded(TreeListBox ownerControl, object item, bool value)
| Parameter | Type | Description |
|---|---|---|
| ownerControl | TreeListBox | The owner control. |
| item | object | The item to update. |
| value | bool | The new value. |
Remarks
The IsExpandedBinding binding property can be set to a two-way binding for a pure XAML-based implementation of this method. Please note that bindings aren't as performant as code, so for large trees or if you see performance issues, it is recommended to override this method instead with custom logic to set the appropriate value.
SetIsSelected(TreeListBox, object, bool)
Sets whether the specified item is selected.
public override void SetIsSelected(TreeListBox ownerControl, object item, bool value)
| Parameter | Type | Description |
|---|---|---|
| ownerControl | TreeListBox | The owner control. |
| item | object | The item to update. |
| value | bool | The new value. |
Remarks
The IsSelectedBinding binding property can be set to a two-way binding for a pure XAML-based implementation of this method. Please note that bindings aren't as performant as code, so for large trees or if you see performance issues, it is recommended to override this method instead with custom logic to set the appropriate value.
SetPropertyValueFromDataObject(PropertyGrid, IDataObject, IPropertyModel)
Sets the value of the specified IPropertyModel from data in a IDataObject.
public virtual bool SetPropertyValueFromDataObject(PropertyGrid sourceControl, IDataObject dataObject, IPropertyModel propertyModel)
| Parameter | Type | Description |
|---|---|---|
| sourceControl | PropertyGrid | The source control that contains the IPropertyModel. |
| dataObject | IDataObject | The IDataObject to examine. |
| propertyModel | IPropertyModel | The IPropertyModel whose value will be set. |
Returns
- bool:
trueif the IPropertyModel value was updated; otherwise,false.
Inherited Members
- TreeListBoxItemAdapter.CanHaveChildren(TreeListBox, object)
- TreeListBoxItemAdapter.CreateVirtualPlaceholder(TreeListBox, object, int)
- TreeListBoxItemAdapter.Filter(TreeListBox, object)
- TreeListBoxItemAdapter.GetAbsolutePath(TreeListBox, object)
- TreeListBoxItemAdapter.GetChildrenQueryMode(TreeListBox, object)
- TreeListBoxItemAdapter.GetDefaultActionCommand(TreeListBox, object)
- TreeListBoxItemAdapter.GetExpandability(TreeListBox, object, int)
- TreeListBoxItemAdapter.GetIsDraggable(TreeListBox, object)
- TreeListBoxItemAdapter.GetIsEditable(TreeListBox, object)
- TreeListBoxItemAdapter.GetIsEditing(TreeListBox, object)
- TreeListBoxItemAdapter.GetIsLoading(TreeListBox, object)
- TreeListBoxItemAdapter.GetIsSelectable(TreeListBox, object)
- TreeListBoxItemAdapter.GetSearchText(TreeListBox, object)
- TreeListBoxItemAdapter.InitializeDataObject(TreeListBox, IDataObject, IEnumerable<object>)
- TreeListBoxItemAdapter.OnDragComplete(InputPointerEventArgs, TreeListBox, DataObject, DragDropEffects)
- TreeListBoxItemAdapter.OnDragHover(DragEventArgs, TreeListBox, object)
- TreeListBoxItemAdapter.OnDragOver(DragEventArgs, TreeListBox, object, TreeItemDropArea)
- TreeListBoxItemAdapter.OnDragStart(InputPointerEventArgs, TreeListBox, DataObject, DragDropEffects)
- TreeListBoxItemAdapter.OnDrop(DragEventArgs, TreeListBox, object, TreeItemDropArea)
- TreeListBoxItemAdapter.SetIsEditing(TreeListBox, object, bool)
- TreeListBoxItemAdapter.ChildrenBinding
- TreeListBoxItemAdapter.ChildrenPath
- TreeListBoxItemAdapter.ChildrenQueryModeDefault
- TreeListBoxItemAdapter.DefaultActionCommandBinding
- TreeListBoxItemAdapter.ExpandabilityDefault
- TreeListBoxItemAdapter.IsDraggableBinding
- TreeListBoxItemAdapter.IsEditableBinding
- TreeListBoxItemAdapter.IsEditableDefault
- TreeListBoxItemAdapter.IsEditingBinding
- TreeListBoxItemAdapter.IsEditingPath
- TreeListBoxItemAdapter.IsExpandedBinding
- TreeListBoxItemAdapter.IsExpandedDefault
- TreeListBoxItemAdapter.IsExpandedPath
- TreeListBoxItemAdapter.IsLoadingBinding
- TreeListBoxItemAdapter.IsLoadingPath
- TreeListBoxItemAdapter.IsSelectableBinding
- TreeListBoxItemAdapter.IsSelectablePath
- TreeListBoxItemAdapter.IsSelectedBinding
- TreeListBoxItemAdapter.IsSelectedPath
- TreeListBoxItemAdapter.PathBinding
- TreeListBoxItemAdapter.SearchTextBinding
- TreeListBoxItemAdapter.TopLevelExpandabilityDefault
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()