閱讀英文

共用方式為


RefreshProperties 列舉

定義

定義識別項,表示 [屬性] 視窗的重新整理型別。

C#
public enum RefreshProperties
繼承
RefreshProperties

欄位

名稱 Description
All 1

必須查詢屬性,並重新整理檢視。

None 0

不需要重新整理。

Repaint 2

檢視必須重新整理。

範例

下列範例會 RefreshPropertiesAttribute 使用 類別來指定 屬性的 DataSource 重新整理模式。 如需完整的程式代碼清單,請參閱 How to: Apply Attributes in Windows Forms Controls

C#
[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;
    }
}

備註

RefreshProperties定義重新整理 屬性視窗 檢視時可使用之重新整理方法類型的標識碼。

適用於

產品 版本
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.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
.NET Standard 2.0, 2.1

另請參閱