UITypeEditor.EditValue 方法

定義

使用由 GetEditStyle() 方法指示的編輯器樣式,來編輯指定物件的值。Edits the value of the specified object using the editor style indicated by the GetEditStyle() method.

多載

EditValue(IServiceProvider, Object)

使用由 GetEditStyle() 方法指示的編輯器樣式,來編輯指定物件的值。Edits the value of the specified object using the editor style indicated by the GetEditStyle() method.

EditValue(ITypeDescriptorContext, IServiceProvider, Object)

使用由 GetEditStyle() 方法所指示的編輯器樣式來編輯指定物件的值。Edits the specified object's value using the editor style indicated by the GetEditStyle() method.

EditValue(IServiceProvider, Object)

使用由 GetEditStyle() 方法指示的編輯器樣式,來編輯指定物件的值。Edits the value of the specified object using the editor style indicated by the GetEditStyle() method.

public:
 System::Object ^ EditValue(IServiceProvider ^ provider, System::Object ^ value);
public object EditValue (IServiceProvider provider, object value);
member this.EditValue : IServiceProvider * obj -> obj
Public Function EditValue (provider As IServiceProvider, value As Object) As Object

參數

provider
IServiceProvider

IServiceProvider,這個編輯器可用來取得服務。An IServiceProvider that this editor can use to obtain services.

value
Object

要編輯的物件。The object to edit.

傳回

物件的新值。The new value of the object.

備註

這個方法會啟動使用者介面來進行值編輯, 而當使用者嘗試編輯已設定此編輯器以編輯其值之類型的值時, 屬性視窗會呼叫。This method launches the user interface for value editing, and is called by the Properties window when a user attempts to edit the value of a type that this editor is configured to edit the value of. 提供服務提供者, 讓編輯器可以取得任何必要的服務。A service provider is provided so that the editor can obtain any required services.

另請參閱

EditValue(ITypeDescriptorContext, IServiceProvider, Object)

使用由 GetEditStyle() 方法所指示的編輯器樣式來編輯指定物件的值。Edits the specified object's value using the editor style indicated by the GetEditStyle() method.

public:
 virtual System::Object ^ EditValue(System::ComponentModel::ITypeDescriptorContext ^ context, IServiceProvider ^ provider, System::Object ^ value);
public virtual object EditValue (System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value);
abstract member EditValue : System.ComponentModel.ITypeDescriptorContext * IServiceProvider * obj -> obj
override this.EditValue : System.ComponentModel.ITypeDescriptorContext * IServiceProvider * obj -> obj
Public Overridable Function EditValue (context As ITypeDescriptorContext, provider As IServiceProvider, value As Object) As Object

參數

context
ITypeDescriptorContext

ITypeDescriptorContext,可用來取得其他的內容資訊。An ITypeDescriptorContext that can be used to gain additional context information.

provider
IServiceProvider

IServiceProvider ,這個編輯器可用來取得服務。An IServiceProvider that this editor can use to obtain services.

value
Object

要編輯的物件。The object to edit.

傳回

物件的新值。The new value of the object. 如果物件的值未經變更,這應該會傳回與已傳遞相同的物件。If the value of the object has not changed, this should return the same object it was passed.

備註

提供服務提供者, 讓編輯器可以取得任何必要的服務。A service provider is provided so that the editor can obtain any required services.

另請參閱

適用於