ComponentEditor.EditComponent Method

Definition

Edits the component and determines whether the given component was modified.

Overloads

EditComponent(Object)

Edits the component and returns a value indicating whether the component was modified.

EditComponent(ITypeDescriptorContext, Object)

Edits the component and returns a value indicating whether the component was modified based upon a given context.

EditComponent(Object)

Source:
BaseComponentEditor.cs
Source:
BaseComponentEditor.cs
Source:
BaseComponentEditor.cs

Edits the component and returns a value indicating whether the component was modified.

C#
public bool EditComponent(object component);

Parameters

component
Object

The component to be edited.

Returns

true if the component was modified; otherwise, false.

Remarks

This method opens an advanced user interface that you can use to edit the component. The default implementation opens a dialog box with a collection of component editor control objects and a user interface.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

EditComponent(ITypeDescriptorContext, Object)

Source:
BaseComponentEditor.cs
Source:
BaseComponentEditor.cs
Source:
BaseComponentEditor.cs

Edits the component and returns a value indicating whether the component was modified based upon a given context.

C#
public abstract bool EditComponent(System.ComponentModel.ITypeDescriptorContext? context, object component);
C#
public abstract bool EditComponent(System.ComponentModel.ITypeDescriptorContext context, object component);

Parameters

context
ITypeDescriptorContext

An optional context object that can be used to obtain further information about the edit.

component
Object

The component to be edited.

Returns

true if the component was modified; otherwise, false.

Remarks

You can override this method to provide a custom editing user interface for a component. From within this method you can display a dialog box or other type of user interface.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1