RefreshProperties 列舉
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
定義識別項,表示 [屬性] 視窗的重新整理型別。
public enum class RefreshProperties
C#
public enum RefreshProperties
type RefreshProperties =
Public Enum 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;
}
}
<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定義重新整理 屬性視窗 檢視時可使用之重新整理方法類型的標識碼。
產品 | 版本 |
---|---|
.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 |