この例では、新しいAppearanceオブジェクトを作成し、背景色と前景色を設定した後、プロパティをデフォルト値にリセットします。
FarPoint.Web.Spread.Appearance appearance = new FarPoint.Web.Spread.Appearance();
appearance.BackColor = Color.Red;
Appearance.ForeColor = Color.Blue;
private void Button1_Click(object sender, System.EventArgs e)
{
appearance.Reset(AppearanceProperty.BackColor);
System.Diagnostics.Debug.Assert(Not appearance.IsDefined(AppearanceProperty.BackColor));
appearance.ResetAll();
System.Diagnostics.Debug.Assert(Not appearance.IsDefined(AppearanceProperty.ForeColor));
}
Dim appearance As New Appearance()
appearance.BackColor = Color.Red
appearance.ForeColor = Color.Blue
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
appearance.Reset(AppearanceProperty.BackColor)
System.Diagnostics.Debug.Assert(Not appearance.IsDefined(AppearanceProperty.BackColor))
appearance.ResetAll()
System.Diagnostics.Debug.Assert(Not appearance.IsDefined(AppearanceProperty.ForeColor))
End Sub