ImageKeyConverter.GetStandardValuesExclusive(ITypeDescriptorContext) 方法

定義

判斷 ImageKeyConverter 的標準值清單是否為獨佔 (也就是,是否允許由 GetStandardValues 所傳回之值以外的值)。

public:
 override bool GetStandardValuesExclusive(System::ComponentModel::ITypeDescriptorContext ^ context);
public override bool GetStandardValuesExclusive (System.ComponentModel.ITypeDescriptorContext context);
public override bool GetStandardValuesExclusive (System.ComponentModel.ITypeDescriptorContext? context);
override this.GetStandardValuesExclusive : System.ComponentModel.ITypeDescriptorContext -> bool
Public Overrides Function GetStandardValuesExclusive (context As ITypeDescriptorContext) As Boolean

參數

context
ITypeDescriptorContext

提供格式內容的 ITypeDescriptorContext,可用來擷取環境的其他資訊,而這個類型轉換子正從此環境叫用。 這個參數或這個參數的屬性可為 null

傳回

Boolean

true 表示清單不允許其他的值,否則為 false。 一律傳回 true

備註

如果方法傳 GetStandardValues 回的清單是獨佔的,則沒有其他值有效。 這是列舉資料類型的一般。 如果清單不是獨佔的,除了提供的標準值清單之外,還有其他有效值 GetStandardValues

如同在這個類型轉換器中實作,這個方法一律會傳 true 回 。

一般而言,您應該先呼叫 GetStandardValuesSupported 方法,再嘗試使用 GetStandardValuesGetStandardValuesExclusive 方法。

適用於