デフォルトで、Infragistics.Win.UltraWinSchedule.MonthViewMulti.DayUIElement オブジェクトは、その Infragistics.Win.UltraWinSchedule.MonthViewMulti.VisibleMonth の一部である Day オブジェクトのみに対して作成されます。ただし、TrailingDaysVisible が True の場合を除きます。その場合最初の Infragistics.Win.UltraWinSchedule.MonthViewMulti.VisibleMonth の先頭日が前の月の日で、最後の Infragistics.Win.UltraWinSchedule.MonthViewMulti.VisibleMonth が次の月の日を表示します。したがって、BorderStyleDay が None 以外に解決する値に設定される場合、Infragistics.Win.UltraWinSchedule.MonthViewMulti.DayUIElement オブジェクトがない週にスペースが表示します。PlaceHoldersVisible が True に設定されていると、表示される週にはその月のグリッドのような外観の多くを提供する各空のスロットの位置に Infragistics.Win.UltraWinSchedule.MonthViewMulti.DayPlaceHolderUIElement があります。
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports Infragistics.Win.UltraWinSchedule.MonthViewMulti Private Sub ShowCurrentMonthOnly() ' Get the current month Dim month As Infragistics.Win.UltraWinSchedule.Month month = Me.ultraMonthViewMulti1.CalendarInfo.GetMonth(DateTime.Today) ' Set the control's FirstMonth property to the current month Me.ultraMonthViewMulti1.FirstMonth = month ' Set the MonthDimensions property to only display one month Me.ultraMonthViewMulti1.MonthDimensions = New Size(1, 1) ' Set the TrailingDaysVisible property to false so that only days ' that fall in the month being displayed are visible Me.ultraMonthViewMulti1.TrailingDaysVisible = False ' Set the PlaceHoldersVisible property to false, so that if the ' BorderStyleDay property is set a value other than None, borders ' are not drawn for the leading and trailing days Me.ultraMonthViewMulti1.PlaceHoldersVisible = False ' Hide the scroll buttons, so the user cannot change which ' month is being displayed Me.ultraMonthViewMulti1.ScrollButtonsVisible = False End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using Infragistics.Win.UltraWinSchedule.MonthViewMulti; private void ShowCurrentMonthOnly() { // Get the current month Infragistics.Win.UltraWinSchedule.Month month; month = this.ultraMonthViewMulti1.CalendarInfo.GetMonth( DateTime.Today ); // Set the control's FirstMonth property to the current month this.ultraMonthViewMulti1.FirstMonth = month; // Set the MonthDimensions property to only display one month this.ultraMonthViewMulti1.MonthDimensions = new Size( 1, 1 ); // Set the TrailingDaysVisible property to false so that only days // that fall in the month being displayed are visible this.ultraMonthViewMulti1.TrailingDaysVisible = false; // Set the PlaceHoldersVisible property to false, so that if the // BorderStyleDay property is set a value other than None, borders // are not drawn for the leading and trailing days this.ultraMonthViewMulti1.PlaceHoldersVisible = false; // Hide the scroll buttons, so the user cannot change which // month is being displayed this.ultraMonthViewMulti1.ScrollButtonsVisible = false; }