PowerTools CalendarGrid for Windows Forms 1.0J
BackColor プロパティ (CalendarCellStyle)
使用例 

CalendarObject の背景色を取得または設定します。
構文
Public Property BackColor As Color
public Color BackColor {get; set;}

プロパティ値

CalendarObject の背景色を表す System.Drawing.Color 値。既定値は Color.Empty です。
使用例
次のサンプルコードは、このプロパティを使用してセルの外観をカスタマイズする方法を示します。このサンプルコードは、CalendarCellStyle クラスに示されている詳細なコード例の一部を抜粋したものです。
private void SetAppearanceProperty()
{
    this.gcCalendarGrid1.Template.Content.GetCell(2, 0).Value = "SampleText";
    this.gcCalendarGrid1.Template.Content.GetCell(2, 0).CellStyle.BackColor = Color.SkyBlue;
    this.gcCalendarGrid1.Template.Content.GetCell(2, 0).CellStyle.ForeColor = Color.SaddleBrown;
    this.gcCalendarGrid1.Template.Content.GetCell(2, 0).CellStyle.Alignment = CalendarGridContentAlignment.MiddleCenter;
    this.gcCalendarGrid1.Template.Content.GetCell(2, 0).CellStyle.PatternEffect = new CalendarPatternEffect(CalendarPatternStyle.DottedGrid, Color.Red);
}
Private Sub SetAppearanceProperty()
    Me.gcCalendarGrid1.Template.Content.GetCell(2, 0).Value = "SampleText"
    Me.gcCalendarGrid1.Template.Content.GetCell(2, 0).CellStyle.BackColor = Color.SkyBlue
    Me.gcCalendarGrid1.Template.Content.GetCell(2, 0).CellStyle.ForeColor = Color.SaddleBrown
    Me.gcCalendarGrid1.Template.Content.GetCell(2, 0).CellStyle.Alignment = CalendarGridContentAlignment.MiddleCenter
    Me.gcCalendarGrid1.Template.Content.GetCell(2, 0).CellStyle.PatternEffect = New CalendarPatternEffect(CalendarPatternStyle.DottedGrid, Color.Red)
End Sub
参照

CalendarCellStyle クラス
CalendarCellStyle メンバ

 

 


© 2014 GrapeCity inc. All rights reserved.