UITypeEditorEditStyle 列舉

定義

指定識別項,指出 UITypeEditor 的值編輯樣式。

C#
public enum UITypeEditorEditStyle
繼承
UITypeEditorEditStyle

欄位

名稱 Description
DropDown 3

顯示下拉式箭號按鈕,並將使用者介面 (UI) 裝載在下拉式對話方塊中。

Modal 2

顯示省略 (...) 按鈕,以啟動強制回應 (Modal) 對話方塊 (會在繼續執行程式前要求使用者輸入),或啟動非強制回應 (Modeless) 對話方塊 (會保留在畫面上且可於任何時候使用,但允許其他使用者活動)。

None 1

沒有提供互動使用者介面 (UI) 元件。

範例

下列程式代碼範例示範如何使用 UITypeEditorEditStyle 來指定自定義 UITypeEditor的樣式。 此程式代碼範例是針對 類別提供的較大範例的 DocumentDesigner 一部分。

C#
public override UITypeEditorEditStyle GetEditStyle(
System.ComponentModel.ITypeDescriptorContext context)
{
    return UITypeEditorEditStyle.DropDown;
}

適用於

產品 版本
.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
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

另請參閱