ListItemsCollectionEditor 類別

定義

在衍生自 ListItemCollection 的控制項或類似的控制項中,提供 ListControl 物件的元件編輯器。

public ref class ListItemsCollectionEditor : System::ComponentModel::Design::CollectionEditor
public class ListItemsCollectionEditor : System.ComponentModel.Design.CollectionEditor
type ListItemsCollectionEditor = class
    inherit CollectionEditor
Public Class ListItemsCollectionEditor
Inherits CollectionEditor
繼承
ListItemsCollectionEditor

範例

下列程式碼範例示範如何使用 EditorAttribute 類別,將 類別和 UITypeEditor 類別關聯 ListItemsCollectionEditor (集合編輯器的基類) 與自訂 ListItems 屬性。

private ListItemCollection items = null;

// Associate the ListItemsCollectionEditor with the ListItems. 
[EditorAttribute(typeof(System.Web.UI.Design.WebControls.
   ListItemsCollectionEditor),
   typeof(UITypeEditor))]
public ListItemCollection ListItems
{
    get { return items; }
} // ListItems
Private items As ListItemCollection

' Associate the ListItemsCollectionEditor with the ListItems.
<EditorAttribute( GetType(System.Web.UI.Design.WebControls. _
    ListItemsCollectionEditor), _
    GetType(UITypeEditor))> _
Public ReadOnly Property ListItems() As ListItemCollection
    Get
        Return items
    End Get
End Property ' ListItems

備註

類別 ListItemsCollectionEditor 提供使用者介面,以編輯 ListItem 衍生自 ListControl 或類似控制項之 控制項內之 物件的專案 ListItemCollection

選取 ListItemsCollectionEditor 視覺化設計工具的 [屬性] 方格中 ListItems 屬性上的省略號 (...) 按鈕,即可叫用 。

方法 CanSelectMultipleInstances 一律會傳 false 回 ,指出在編輯器中一次只能選取一個物件。 屬性 HelpTopic 會傳回編輯器所顯示說明主題的名稱。

建構函式

ListItemsCollectionEditor(Type)

初始化 ListItemsCollectionEditor 類別的新執行個體。

屬性

CollectionItemType

取得集合中每個項目的資料型別。

(繼承來源 CollectionEditor)
CollectionType

取得集合物件 (Collection Object) 的資料型別。

(繼承來源 CollectionEditor)
Context

取得指示目前內容的型別描述項。

(繼承來源 CollectionEditor)
HelpTopic

取得要針對 ListItemsCollectionEditor 物件顯示的說明主題。

HelpTopic

當按下編輯器的對話方塊 [說明] 按鈕或 F1 鍵時,取得 Help 關鍵字以顯示說明主題或主題清單。

(繼承來源 CollectionEditor)
IsDropDownResizable

取得值,表示使用者是否能夠調整下拉式編輯器的大小。

(繼承來源 UITypeEditor)
NewItemTypes

取得可為這個集合建立的項目之可用型別。

(繼承來源 CollectionEditor)

方法

CancelChanges()

取消對集合所做的變更。

(繼承來源 CollectionEditor)
CanRemoveInstance(Object)

指示集合的原始成員是否可移除。

(繼承來源 CollectionEditor)
CanSelectMultipleInstances()

取得值,指出是否可一次選取多重 ListItem 項目。

CreateCollectionForm()

建立要顯示和編輯目前集合的新表單。

(繼承來源 CollectionEditor)
CreateCollectionItemType()

取得這個集合所包含的資料型別。

(繼承來源 CollectionEditor)
CreateInstance(Type)

建立指定集合項目型別的新執行個體。

(繼承來源 CollectionEditor)
CreateNewItemTypes()

取得這個集合編輯器可包含的資料型別。

(繼承來源 CollectionEditor)
DestroyInstance(Object)

終結物件的指定執行個體。

(繼承來源 CollectionEditor)
EditValue(IServiceProvider, Object)

使用由 GetEditStyle() 方法指示的編輯器樣式,來編輯指定物件的值。

(繼承來源 UITypeEditor)
EditValue(ITypeDescriptorContext, IServiceProvider, Object)

使用指定服務提供者和內容,編輯指定物件的值。

(繼承來源 CollectionEditor)
Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetDisplayText(Object)

取出指定清單項目的顯示文字。

(繼承來源 CollectionEditor)
GetEditStyle()

取得 EditValue(IServiceProvider, Object) 方法所使用的編輯器樣式。

(繼承來源 UITypeEditor)
GetEditStyle(ITypeDescriptorContext)

取得 EditValue(ITypeDescriptorContext, IServiceProvider, Object) 方法所使用的編輯樣式。

(繼承來源 CollectionEditor)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetItems(Object)

取得包含指定集合的物件陣列。

(繼承來源 CollectionEditor)
GetObjectsFromInstance(Object)

傳回含有指定物件的清單。

(繼承來源 CollectionEditor)
GetPaintValueSupported()

指出這個編輯器是否支援繪製物件值的表示。

(繼承來源 UITypeEditor)
GetPaintValueSupported(ITypeDescriptorContext)

指出指定的內容是否支援在指定的內容中繪製物件值的表示。

(繼承來源 UITypeEditor)
GetService(Type)

如果有可用的服務,則取得所要求的服務。

(繼承來源 CollectionEditor)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
PaintValue(Object, Graphics, Rectangle)

將指定物件的表示值繪製到指定的畫布上。

(繼承來源 UITypeEditor)
PaintValue(PaintValueEventArgs)

使用指定的 PaintValueEventArgs 來繪製物件值的表示。

(繼承來源 UITypeEditor)
SetItems(Object, Object[])

設定指定的陣列為集合的項目。

(繼承來源 CollectionEditor)
ShowHelp()

顯示集合編輯器的預設說明主題。

(繼承來源 CollectionEditor)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱