RefreshPropertiesAttribute クラス

定義

関連付けられているプロパティ値が変更されたときに、プロパティ グリッドを更新する必要があることを示します。 このクラスは継承できません。

public ref class RefreshPropertiesAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.All)]
public sealed class RefreshPropertiesAttribute : Attribute
public sealed class RefreshPropertiesAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.All)>]
type RefreshPropertiesAttribute = class
    inherit Attribute
type RefreshPropertiesAttribute = class
    inherit Attribute
Public NotInheritable Class RefreshPropertiesAttribute
Inherits Attribute
継承
RefreshPropertiesAttribute
属性

次のコード例では、 RefreshPropertiesAttribute クラスを使用して、 DataSource プロパティの更新モードを指定します。 完全なコード一覧については、「方法: Windows Forms コントロールで属性を適用するを参照してください。

[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

注釈

RefreshPropertiesAttributeは、PropertyGrid コントロールを更新するときに使用する更新モードの種類を示します。

コンストラクター

名前 説明
RefreshPropertiesAttribute(RefreshProperties)

RefreshPropertiesAttribute クラスの新しいインスタンスを初期化します。

フィールド

名前 説明
All

プロパティ値が変更されると、すべてのプロパティが再度クエリされ、更新されることを示します。 このフィールドは読み取り専用です。

Default

プロパティ値が変更された場合に、他のプロパティが更新されていないことを示します。 このフィールドは読み取り専用です。

Repaint

プロパティ値が変更された場合に、すべてのプロパティが再描画されることを示します。 このフィールドは読み取り専用です。

プロパティ

名前 説明
RefreshProperties

メンバーの更新プロパティを取得します。

TypeId

派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。

(継承元 Attribute)

メソッド

名前 説明
Equals(Object)

オブジェクトの Equals メソッドをオーバーライドします。

GetHashCode()

このオブジェクトのハッシュ コードを返します。

GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
IsDefaultAttribute()

属性の現在の値が属性の既定値かどうかを示す値を取得します。

Match(Object)

派生クラスでオーバーライドされた場合、このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。

(継承元 Attribute)
MemberwiseClone()

現在の Objectの簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

明示的なインターフェイスの実装

名前 説明
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

一連の名前を対応する一連のディスパッチ識別子に割り当てます。

(継承元 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

インターフェイスの型情報を取得するために使用できるオブジェクトの型情報を取得します。

(継承元 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。

(継承元 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

オブジェクトによって公開されるプロパティとメソッドへのアクセスを提供します。

(継承元 Attribute)

適用対象

こちらもご覧ください