Scheduler for WinForms
BeforeGroupHeaderFormat イベント (C1Schedule)
使用例 

C1.Win.Schedule.6 アセンブリ > C1.Win.Schedule 名前空間 > C1Schedule クラス : BeforeGroupHeaderFormat イベント
グループヘッダーが書式設定される前に発生します。
シンタックス
'宣言
 
Public Event BeforeGroupHeaderFormat As System.EventHandler(Of BeforeGroupHeaderFormatEventArgs)
public event System.EventHandler<BeforeGroupHeaderFormatEventArgs> BeforeGroupHeaderFormat
イベント データ

イベント ハンドラが、このイベントに関連するデータを含む、BeforeGroupHeaderFormatEventArgs 型の引数を受け取りました。次の BeforeGroupHeaderFormatEventArgs プロパティには、このイベントの固有の情報が記載されます。

プロパティ解説
現在書式設定されている ScheduleGroupItem オブジェクトを取得します。  
グループヘッダータブの外観を決定する GroupTabStyle 値を取得または設定します。  
グループヘッダーに表示される html テキストを取得または設定します。  
Style オブジェクトを取得または設定します。これは、グループヘッダーの表示に使用されます。  
グループヘッダータブの外観を決定する System.Boolean 値を取得または設定します。 このプロパティ値が true の場合、C1Schedule は MS Outlook 2010 形式のグループヘッダーを表示します。 このプロパティ値が false の場合、C1Schedule は四角形のグループヘッダーを表示します。  
解説
このイベントを使用して、デフォルトのグループヘッダーの外観を変更します。 グループヘッダーのスタイル、タブ形状、または表示される内容を変更できます。
使用例
次のサンプルは、BeforeGroupHeaderFormatEventArgs プロパティに応じてグループヘッダーの外観を変更する方法を示しています。
private void c1Schedule1_BeforeGroupHeaderFormat(object sender, BeforeGroupHeaderFormatEventArgs e)
{
    Contact owner = e.Group.Owner as Contact;
    if (owner != null)
    {
        TestSchedule.NwindDataSet.EmployeesRow row = this.nwindDataSet.Employees.FindByEmployeeID((int)owner.Key[0]);
        if (row != null)
        {
            string imageName = "photo" + row.EmployeeID + ".bmp";
            if (File.Exists(imageName))
            {
					// ファイルから取得した画像を使用します
					// C1Schedule は、インターネット(http://..)、アプリケーションリソース(res://..)、
					// およびローカルファイルシステム(file:///...)から取得した画像のみを受け入れます。
					e.Html = row.FirstName + " " + row.LastName + "<br><img src=file:///" + imageName + "/>";
            }
        }
    }
    if (e.Style.Hot != null)
    {
        // ScheduleGroupItem が選択されている場合は、ホットスタイルがグループヘッダーに適用されます。
        e.Style.Hot.BackColor2 = e.Style.Hot.BorderColor = Color.DarkSlateGray;
        e.Style.Hot.ForeColor = Color.WhiteSmoke;
    }
    // 四角形のタブを使用します
    e.TriangleTab = false;
}
参照