RefreshProperties Enum

Definition

Definierar identifierare som anger typen av uppdatering av Properties window.

public enum class RefreshProperties
public enum RefreshProperties
type RefreshProperties = 
Public Enum RefreshProperties
Arv
RefreshProperties

Fält

Name Värde Description
None 0

Ingen uppdatering krävs.

All 1

Egenskaperna ska frågas om och vyn ska uppdateras.

Repaint 2

Vyn bör uppdateras.

Exempel

I följande exempel används RefreshPropertiesAttribute klassen för att ange uppdateringsläget för en DataSource egenskap. En fullständig kodlista finns i 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 => _dataGridView1.DataSource;
    set => _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

Kommentarer

RefreshProperties definierar identifierare för typer av uppdateringsmetoder som kan användas när du uppdaterar vyn för Properties window.

Gäller för

Se även