ParameterCollectionEditor 類別

定義

提供 ParameterCollection 物件的元件編輯器,這個物件是由關聯的資料來源控制項的 Parameters 屬性所指定。Provides a component editor for the ParameterCollection object that is specified by the Parameters properties of the associated data source control.

public ref class ParameterCollectionEditor : System::Drawing::Design::UITypeEditor
public class ParameterCollectionEditor : System.Drawing.Design.UITypeEditor
type ParameterCollectionEditor = class
    inherit UITypeEditor
Public Class ParameterCollectionEditor
Inherits UITypeEditor
繼承
ParameterCollectionEditor

範例

下列程式碼範例EditorAttribute顯示如何使用屬性, ParameterCollectionEditor將和UITypeEditor ( SelectParameters集合編輯器基類) 類別與自訂控制項中的屬性產生關聯。The following code example shows how to use the EditorAttribute attribute to associate the ParameterCollectionEditor and UITypeEditor (the collection editor base class) classes with a SelectParameters property in a custom control.

private ParameterCollection selectParams;

// Associate the ParameterCollectionEditor with the SelectParameters. 
[Editor(typeof(System.Web.UI.Design.WebControls.
    ParameterCollectionEditor),
    typeof(UITypeEditor))]
public ParameterCollection SelectParameters
{
    get
    {
        // If there is no selectParams collection, create it.
        if (selectParams == null)
            selectParams = new ParameterCollection();

        return selectParams;
    }
    set { selectParams = value; }
} // SelectParameters
Private selectParams As ParameterCollection

' Associate the ParameterCollectionEditor with the SelectParameters. 
<EditorAttribute(GetType(System.Web.UI.Design.WebControls. _
    ParameterCollectionEditor), _
    GetType(UITypeEditor))> _
Public Property SelectParameters() As ParameterCollection
    Get
        If selectParams Is Nothing Then
            selectParams = New ParameterCollection()
        End If
        Return selectParams
    End Get
    Set(ByVal value As ParameterCollection)
        selectParams = value
    End Set
End Property ' SelectParameters

備註

類別會提供使用者介面, 以便在設計Parameter時間編輯ParameterCollection物件的元素, 如其中一個屬性所Parameters指定。 ParameterCollectionEditorThe ParameterCollectionEditor class provides a user interface for editing the Parameter elements of the ParameterCollection object at design time, as specified by one of the Parameters properties. SelectParameters UpdateParameters InsertParameters ObjectDataSource屬性包括、和SqlDataSource其他資料來源控制項的、 、和屬性。FilterParameters DeleteParameters ParametersThe Parameters properties include the DeleteParameters, FilterParameters, InsertParameters, SelectParameters and UpdateParameters properties of the ObjectDataSource, SqlDataSource, and other data source controls.

的叫用方式Parameters 是在視覺化設計工具的 [屬性] 方格中, 選取其中一個屬性上的省略號 (... ParameterCollectionEditor ) 按鈕。The ParameterCollectionEditor is invoked by selecting the ellipsis () button on one of the Parameters properties in the Properties grid of the visual designer.

方法會ParameterCollection針對相關Parameter聯的資料來源控制項, 編輯的元素。 EditValueThe EditValue method edits the Parameter elements of the ParameterCollection for the associated data source control. GetEditStyle方法會取得與此編輯器相關聯的編輯樣式。The GetEditStyle method gets the editing style that is associated with this editor.

建構函式

ParameterCollectionEditor()

初始化 ParameterCollectionEditor 類別的新執行個體。Initializes a new instance of the ParameterCollectionEditor class.

屬性

IsDropDownResizable

取得值,表示使用者是否能夠調整下拉式編輯器的大小。Gets a value indicating whether drop-down editors should be resizable by the user.

(繼承來源 UITypeEditor)

方法

EditValue(IServiceProvider, Object)

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

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

編輯關聯資料來源控制項之 ParameterCollection 物件的項目。Edits the elements of the ParameterCollection objects of the associated data source control.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetEditStyle()

取得 EditValue(IServiceProvider, Object) 方法所使用的編輯器樣式。Gets the editor style used by the EditValue(IServiceProvider, Object) method.

(繼承來源 UITypeEditor)
GetEditStyle(ITypeDescriptorContext)

取得與這個編輯器相關聯的編輯樣式。Gets the editing style that is associated with this editor.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetPaintValueSupported()

指出這個編輯器是否支援繪製物件值的表示。Indicates whether this editor supports painting a representation of an object's value.

(繼承來源 UITypeEditor)
GetPaintValueSupported(ITypeDescriptorContext)

指出指定的內容是否支援在指定的內容中繪製物件值的表示。Indicates whether the specified context supports painting a representation of an object's value within the specified context.

(繼承來源 UITypeEditor)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

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

將指定物件的表示值繪製到指定的畫布上。Paints a representation of the value of the specified object to the specified canvas.

(繼承來源 UITypeEditor)
PaintValue(PaintValueEventArgs)

使用指定的 PaintValueEventArgs 來繪製物件值的表示。Paints a representation of the value of an object using the specified PaintValueEventArgs.

(繼承來源 UITypeEditor)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於

另請參閱