バージョン

RangeEndDate プロパティ (AppointmentRecurrence)

定期的なアイテムの終了日を取得または設定します。RangeLimit プロパティが「LimitByDate」に設定されている場合のみ適用されます。
シンタックス
'宣言
 
Public Overrides Property RangeEndDate As Date
public override DateTime RangeEndDate {get; set;}
解説

注:RangeLimit が「NoLimit」または「LimitByNumberOfOccurrences」に設定されている場合は、RangeEndDate プロパティを設定しても効果はありません。戻り値は、繰り返しパターンの条件と RangeMaxOccurrences プロパティで指定された回数を使用して計算されます。

定期的な予定の最後の回は必ずしも RangeEndDate と一致するとは限りませんが、この日以降にこの予定が繰り返されることはありません。

RangeEndDate プロパティを、関連付けられた CalendarInfo の UltraCalendarInfo.MinDateプロパティと UltraCalendarInfo.MaxDate プロパティで定義された範囲から外れた値に設定すると、例外がスローされます。

使用例
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.Diagnostics

    Private Sub CreateLimitedRecurrences()
        ' The 'RangeLimit' is used to indicate what will
        ' determine when the last occurrence will occur.
        ' By default, this is set to NoLimit and is only
        ' limited by the MaxDate of the containing
        ' calendarinfo. When set to 'LimitByNumberOfOccurrences',
        ' the recurrence will be limited by the 
        ' 'RangeMaxOccurrences' value. When set to
        ' 
        '

        ' The following recurrence is not limited
        ' other then by the max date of the associated
        ' calendar info.
        '
        Dim dt As DateTime = DateTime.Now
        Dim dailyAppt As Appointment = Me.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3D), String.Empty)

        ' create the recurrence object - this appointment
        ' will become the rootappointment (or representation
        ' of the series) - it's 'IsRecurringAppointmentRoot'
        ' will return true and it will not displayed in 
        ' the associated controls. instead, instances or 
        ' occurrences of the recurrence will appear in the
        ' the controls associated with the calendar info.
        dailyAppt.Recurrence = New AppointmentRecurrence()

        ' This will be a daily recurrence that will occur
        ' each weekday
        dailyAppt.Recurrence.PatternFrequency = RecurrencePatternFrequency.Daily

        ' In this case, we use the 'PatternDaysOfWeek' to
        ' indicate that the daily occurrences should fall
        ' on every weekday (each day but saturday and sunday).
        dailyAppt.Recurrence.PatternDaysOfWeek = RecurrencePatternDaysOfWeek.AllWeekdays

        dailyAppt.Recurrence.RangeLimit = RecurrenceRangeLimit.NoLimit

        ' assign a subject [not required]
        dailyAppt.Subject = "A daily activity that occurs every weekday with no limits"


        ' Another appointment with the same information
        ' that will end after 10 occurrences...
        '
        Dim dailyAppt2 As Appointment = Me.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3D), String.Empty)

        ' create the recurrence object - this appointment
        ' will become the rootappointment (or representation
        ' of the series) - see above for more
        dailyAppt2.Recurrence = New AppointmentRecurrence()

        ' This will be a daily recurrence that will occur
        ' each weekday
        dailyAppt2.Recurrence.PatternFrequency = RecurrencePatternFrequency.Daily

        ' In this case, we use the 'PatternDaysOfWeek' to
        ' indicate that the daily occurrences should fall
        ' on every weekday (each day but saturday and sunday).
        dailyAppt2.Recurrence.PatternDaysOfWeek = RecurrencePatternDaysOfWeek.AllWeekdays

        ' the RangeLimit here is used to indicate
        ' that it has a limited # of occurances but
        ' is not limited by date (other then the maxdate
        ' of the calendarinfo)
        dailyAppt2.Recurrence.RangeLimit = RecurrenceRangeLimit.LimitByNumberOfOccurrences

        ' the 'RangeMaxOccurrences' is used to indicate
        ' the limiting number of occurrences.
        dailyAppt2.Recurrence.RangeMaxOccurrences = 10

        ' assign a subject [not required]
        dailyAppt2.Subject = "A daily activity that occurs every weekday for 10 occurrences"



        ' Another appointment with the same information
        ' that will end in 30 days
        '

        Dim dailyAppt3 As Appointment = Me.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3D), String.Empty)

        ' create the recurrence object - this appointment
        ' will become the rootappointment (or representation
        ' of the series) - see above for more
        dailyAppt3.Recurrence = New AppointmentRecurrence()

        ' This will be a daily recurrence that will occur
        ' each weekday
        dailyAppt3.Recurrence.PatternFrequency = RecurrencePatternFrequency.Daily

        ' In this case, we use the 'PatternDaysOfWeek' to
        ' indicate that the daily occurrences should fall
        ' on every weekday (each day but saturday and sunday).
        dailyAppt3.Recurrence.PatternDaysOfWeek = RecurrencePatternDaysOfWeek.AllWeekdays

        ' the RangeLimit here is used to indicate
        ' that no occurrences will occur after
        ' the specified end date
        dailyAppt3.Recurrence.RangeLimit = RecurrenceRangeLimit.LimitByDate

        ' the 'RangeEndDate' is used to indicate
        ' the last possible date for an occurrence
        dailyAppt3.Recurrence.RangeEndDate = dt.AddDays(30D)

        ' assign a subject [not required]
        dailyAppt3.Subject = "A daily activity that occurs every weekday for the next 30 days"

    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.Diagnostics;

		private void CreateLimitedRecurrences()
		{
			// The 'RangeLimit' is used to indicate what will
			// determine when the last occurrence will occur.
			// By default, this is set to NoLimit and is only
			// limited by the MaxDate of the containing
			// calendarinfo. When set to 'LimitByNumberOfOccurrences',
			// the recurrence will be limited by the 
			// 'RangeMaxOccurrences' value. When set to
			// 
			//

			// The following recurrence is not limited
			// other then by the max date of the associated
			// calendar info.
			//
			#region NoLimit

			DateTime dt = DateTime.Now;
			Appointment dailyAppt = this.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3d), string.Empty);

			// create the recurrence object - this appointment
			// will become the rootappointment (or representation
			// of the series) - it's 'IsRecurringAppointmentRoot'
			// will return true and it will not displayed in 
			// the associated controls. instead, instances or 
			// occurrences of the recurrence will appear in the
			// the controls associated with the calendar info.
			dailyAppt.Recurrence = new AppointmentRecurrence();

			// This will be a daily recurrence that will occur
			// each weekday
			dailyAppt.Recurrence.PatternFrequency = RecurrencePatternFrequency.Daily;

			// In this case, we use the 'PatternDaysOfWeek' to
			// indicate that the daily occurrences should fall
			// on every weekday (each day but saturday and sunday).
			dailyAppt.Recurrence.PatternDaysOfWeek = RecurrencePatternDaysOfWeek.AllWeekdays;

			dailyAppt.Recurrence.RangeLimit = RecurrenceRangeLimit.NoLimit;

			// assign a subject [not required]
			dailyAppt.Subject = "A daily activity that occurs every weekday with no limits";

			#endregion //NoLimit


			// Another appointment with the same information
			// that will end after 10 occurrences...
			//
			#region LimitByNumberOfOccurrences

			Appointment dailyAppt2 = this.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3d), string.Empty);

			// create the recurrence object - this appointment
			// will become the rootappointment (or representation
			// of the series) - see above for more
			dailyAppt2.Recurrence = new AppointmentRecurrence();

			// This will be a daily recurrence that will occur
			// each weekday
			dailyAppt2.Recurrence.PatternFrequency = RecurrencePatternFrequency.Daily;

			// In this case, we use the 'PatternDaysOfWeek' to
			// indicate that the daily occurrences should fall
			// on every weekday (each day but saturday and sunday).
			dailyAppt2.Recurrence.PatternDaysOfWeek = RecurrencePatternDaysOfWeek.AllWeekdays;

			// the RangeLimit here is used to indicate
			// that it has a limited # of occurances but
			// is not limited by date (other then the maxdate
			// of the calendarinfo)
			dailyAppt2.Recurrence.RangeLimit = RecurrenceRangeLimit.LimitByNumberOfOccurrences;

			// the 'RangeMaxOccurrences' is used to indicate
			// the limiting number of occurrences.
			dailyAppt2.Recurrence.RangeMaxOccurrences = 10;

			// assign a subject [not required]
			dailyAppt2.Subject = "A daily activity that occurs every weekday for 10 occurrences";

			#endregion //LimitByNumberOfOccurrences


			// Another appointment with the same information
			// that will end in 30 days
			//
			#region LimitByNumberOfOccurrences

			Appointment dailyAppt3 = this.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3d), string.Empty);

			// create the recurrence object - this appointment
			// will become the rootappointment (or representation
			// of the series) - see above for more
			dailyAppt3.Recurrence = new AppointmentRecurrence();

			// This will be a daily recurrence that will occur
			// each weekday
			dailyAppt3.Recurrence.PatternFrequency = RecurrencePatternFrequency.Daily;

			// In this case, we use the 'PatternDaysOfWeek' to
			// indicate that the daily occurrences should fall
			// on every weekday (each day but saturday and sunday).
			dailyAppt3.Recurrence.PatternDaysOfWeek = RecurrencePatternDaysOfWeek.AllWeekdays;

			// the RangeLimit here is used to indicate
			// that no occurrences will occur after
			// the specified end date
			dailyAppt3.Recurrence.RangeLimit = RecurrenceRangeLimit.LimitByDate;

			// the 'RangeEndDate' is used to indicate
			// the last possible date for an occurrence
			dailyAppt3.Recurrence.RangeEndDate = dt.AddDays(30d);

			// assign a subject [not required]
			dailyAppt3.Subject = "A daily activity that occurs every weekday for the next 30 days";

			#endregion //LimitByNumberOfOccurrences
		}
参照