RefreshProperties 枚举 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
定义指示“属性”窗口刷新类型的标识符。
public enum class RefreshPropertiespublic enum RefreshPropertiestype RefreshProperties = Public Enum RefreshProperties- 继承
字段
| 名称 | 值 | 说明 | 
|---|---|---|
| All | 1 | 应该重新查询该属性并刷新视图。 | 
| None | 0 | 不需要进行刷新。 | 
| Repaint | 2 | 应该刷新该视图。 | 
示例
以下示例使用 RefreshPropertiesAttribute 类为 属性指定刷新模式 DataSource 。 有关完整代码列表,请参阅如何:在Windows 窗体控件中应用属性。
[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定义刷新属性窗口视图时可以使用的刷新方法类型的标识符。