RefreshProperties 列舉

定義

定義識別項,表示 [屬性] 視窗的重新整理型別。Defines identifiers that indicate the type of a refresh of the Properties window.

public enum class RefreshProperties
public enum RefreshProperties
type RefreshProperties = 
Public Enum RefreshProperties
繼承
RefreshProperties

欄位

All 1

必須查詢屬性,並重新整理檢視。The properties should be requeried and the view should be refreshed.

None 0

不需要重新整理。No refresh is necessary.

Repaint 2

檢視必須重新整理。The view should be refreshed.

範例

下列範例會使用RefreshPropertiesAttribute類別來指定DataSource屬性的重新整理模式。The following example uses the RefreshPropertiesAttribute class to specify the refresh mode for a DataSource property. 如需完整的程式代碼清單, 請參閱如何:在 Windows Forms 控制項中套用屬性。For a full code listing, see How to: Apply Attributes in Windows Forms Controls.

[Category("Data")]
[Description("Indicates the source of data for the control.")]
[RefreshProperties(RefreshProperties.Repaint)]
[AttributeProvider(typeof(IListSource))]
public object DataSource
{
    get
    {
        return this.dataGridView1.DataSource;
    }

    set
    {
        this.dataGridView1.DataSource = value;
    }
}
<Category("Data"), _
Description("Indicates the source of data for the control."), _
RefreshProperties(RefreshProperties.Repaint), _
AttributeProvider(GetType(IListSource))> _
Public Property DataSource() As Object
    Get
        Return Me.dataGridView1.DataSource
    End Get

    Set(ByVal value As Object)
        Me.dataGridView1.DataSource = value
    End Set
End Property

備註

RefreshProperties定義重新整理屬性視窗的視圖時, 可使用之重新整理方法類型的識別碼。RefreshProperties defines identifiers for types of refresh methods that can be used when refreshing the view of the Properties window.

適用於

另請參閱