ComponentEditor.EditComponent 方法
本文內容
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
編輯元件並且判斷是否已修改指定的元件。
EditComponent(Object) |
編輯元件並傳回指示是否已修改元件的值。 |
EditComponent(ITypeDescriptorContext, Object) |
編輯元件並傳回值,表示是否已根據指定的內容修改元件。 |
編輯元件並傳回指示是否已修改元件的值。
public:
bool EditComponent(System::Object ^ component);
public bool EditComponent (object component);
member this.EditComponent : obj -> bool
Public Function EditComponent (component As Object) As Boolean
參數
- component
- Object
要編輯的元件。
傳回
如果已修改元件,則為 true
,否則為 false
。
備註
這個方法會開啟可用來編輯元件的進階用戶介面。 默認實作會開啟一個對話框,其中包含元件編輯器控件對象和使用者介面的集合。
適用於
.NET 9 及其他版本
產品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.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 |
編輯元件並傳回值,表示是否已根據指定的內容修改元件。
public:
abstract bool EditComponent(System::ComponentModel::ITypeDescriptorContext ^ context, System::Object ^ component);
public abstract bool EditComponent (System.ComponentModel.ITypeDescriptorContext context, object component);
public abstract bool EditComponent (System.ComponentModel.ITypeDescriptorContext? context, object component);
abstract member EditComponent : System.ComponentModel.ITypeDescriptorContext * obj -> bool
Public MustOverride Function EditComponent (context As ITypeDescriptorContext, component As Object) As Boolean
參數
- context
- ITypeDescriptorContext
選擇性的內容物件,可用於取得有關編輯的詳細資訊。
- component
- Object
要編輯的元件。
傳回
如果已修改元件,則為 true
,否則為 false
。
備註
您可以覆寫這個方法,以提供元件的自定義編輯使用者介面。 從這個方法中,您可以顯示對話方塊或其他類型的使用者介面。
適用於
.NET 9 及其他版本
產品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.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 |