'宣言 Public Event InitializeDayView As InitializeDayViewEventHandler
public event InitializeDayViewEventHandler InitializeDayView
イベント ハンドラが、このイベントに関連するデータを含む、InitializeDayViewEventArgs 型の引数を受け取りました。次の InitializeDayViewEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 解説 |
---|---|
Control | 印刷操作に使用する Infragistics.Win.UltraWinSchedule.UltraDayView コントロールを返します。 |
UltraSchedulePrintDocumentは、カレンダー情報をプリンタに描画するためにさまざまなスケジュールコントロールのインスタンスを作成しますコントロールが作成される時に、それぞれの「Template」プロパティ (TemplateDayView など) に基づいて初期化され、次にコントロールにさらなるカスタマイズを可能とするために関連付けられた初期化イベント (InitializeDayView など)が呼び出されます。
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' add an additional owner Me.UltraSchedulePrintDocument1.CalendarInfo.Owners.Add(Environment.UserName) ' select a week of dates Me.UltraSchedulePrintDocument1.CalendarInfo.SelectedDateRanges.Clear() Me.UltraSchedulePrintDocument1.CalendarInfo.SelectedDateRanges.Add(DateTime.Today, DateTime.Today.AddDays(7D)) End Sub Private Sub UltraSchedulePrintDocument1_InitializeDayView(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.Printing.InitializeDayViewEventArgs) Handles UltraSchedulePrintDocument1.InitializeDayView ' properties that affect the general display ' are always available e.Control.AdditionalTimeZoneVisible = True Dim timeZones As ArrayList = Infragistics.Win.Utilities.GetTimeZones() e.Control.AdditionalTimeZoneUtcOffset = (CType(timeZones(2), TimeZoneInfo)).UtcOffset e.Control.AdditionalTimeZoneLabel = (CType(timeZones(2), TimeZoneInfo)).StandardName e.Control.CurrentTimeZoneLabel = "Local Time" ' while others may be overriden depending on the print style... ' the grouping style and preferredinview properties ' can be used to determine how many columns are printed ' per page e.Control.GroupingStyle = DayViewGroupingStyle.DateWithinOwner e.Control.PreferredInViewGroupCount = 2 ' 2 owners per page e.Control.PreferredInViewColumnCount = 6 ' 3 dates per owner per page End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void Form1_Load(object sender, System.EventArgs e) { // add an additional owner this.ultraSchedulePrintDocument1.CalendarInfo.Owners.Add(Environment.UserName); // select a week of dates this.ultraSchedulePrintDocument1.CalendarInfo.SelectedDateRanges.Clear(); this.ultraSchedulePrintDocument1.CalendarInfo.SelectedDateRanges.Add(DateTime.Today, DateTime.Today.AddDays(7d)); } private void ultraSchedulePrintDocument1_InitializeDayView(object sender, Infragistics.Win.UltraWinSchedule.Printing.InitializeDayViewEventArgs e) { // properties that affect the general display // are always available e.Control.AdditionalTimeZoneVisible = true; ArrayList timeZones = Infragistics.Win.Utilities.GetTimeZones(); e.Control.AdditionalTimeZoneUtcOffset = ((TimeZoneInfo)timeZones[2]).UtcOffset; e.Control.AdditionalTimeZoneLabel = ((TimeZoneInfo)timeZones[2]).StandardName; e.Control.CurrentTimeZoneLabel = "Local Time"; // while others may be overriden depending on the print style... // the grouping style and preferredinview properties // can be used to determine how many columns are printed // per page e.Control.GroupingStyle = DayViewGroupingStyle.DateWithinOwner; e.Control.PreferredInViewGroupCount = 2; // 2 owners per page e.Control.PreferredInViewColumnCount = 6; // 3 dates per owner per page }