RefreshProperties [プロパティ] ウィンドウの表示を更新するときの型を示す識別子を定義します。
All/None/Repaint
RefreshProperties.All はオブジェクトそのものに対してそのプロパティを検索することを意味します。
変更によってプロパティの追加または削除が引き起こされるときには All を使用します。
RefreshProperties.Repaint はすべてのプロパティの値を検索して再ペイントするよう指定します。
変更によってプロパティの追加または削除が無いほとんどのケースで適しています。
RefreshProperties.None プロパティを変更しても再表示されません。
/// <summary>
/// RefreshProperties(RefreshProperties.All) のサンプルです。
///
/// プロパティを変更するとComplexValue1の配列数が変わり、
/// データが初期化され再表示されます。
/// </summary>
[RefreshProperties(RefreshProperties.All)]
public int NumberofcomplexValue1
{
get
{
return numberofcomplexValue1;
}
set
{
numberofcomplexValue1=value;
complexValue1 = new Complex[numberofcomplexValue1] ;
for ( int i=0 ; i<numberofcomplexValue1 ; i++ )
{
complexValue1[i] = new Complex(10,20) ;
}
}
}
/// <summary>
/// RefreshProperties(RefreshProperties.Repaint) のサンプルです。
///
/// プロパティを変更するとComplexValue1の配列数が変わらずに、
/// データが初期化され再表示されます。
/// </summary>
[RefreshProperties(RefreshProperties.Repaint)]
public int NumberofcomplexValue2
{
get
{
return numberofcomplexValue2;
}
set
{
numberofcomplexValue2=value;
complexValue2 = new Complex[numberofcomplexValue2] ;
for ( int i=0 ; i<numberofcomplexValue2 ; i++ )
{
complexValue2[i] = new Complex(10,20) ;
}
}
}