UltraGanttView のタスクの背景色を変更する方法のご紹介です。
UltraGanttView のタスクの持つ、TimelineSettings.BarSettings.BarAppearance プロパティ配下にある BackColor プロパティおよび BackColor2 プロパティに任意の色情報を与えることで背景色を変更することができます。
実装例
private void Form1_Load(object sender, EventArgs e)
{
#region UltraGanttView 初期設定
...
#endregion
//タスクのスタイル変更
//WinGanttView のチャート セクションのカスタマイズ
//https://jp.infragistics.com/help/winforms/winganttview-customize-chart-section-of-winganttview
budgetTask.TimelineSettings.BarSettings.BarAppearance.BackColor = Color.Red;
budgetTask.TimelineSettings.BarSettings.BarAppearance.BackColor2 = Color.Red;
teamTask.TimelineSettings.BarSettings.BarAppearance.BackColor = Color.Yellow;
teamTask.TimelineSettings.BarSettings.BarAppearance.BackColor2 = Color.Yellow;
}
実行結果
