'宣言 Public Property WeekRule As Nullable(Of CalendarWeekRule)
public Nullable<CalendarWeekRule> WeekRule {get; set;}
デフォルトで、コントロールの System.Windows.FrameworkElement.Language と関連付けられた Culture の System.Globalization.DateTimeFormatInfo.CalendarWeekRule がコントロールで表示される日付の週数を決定するために使用されます。を計算するときに WeekRule を使用します。
Imports Infragistics.Windows.Editors Imports Infragistics.Windows.Controls Private Sub InitializeCalendar(ByVal calendar As XamMonthCalendar) ' by default the week numbers are not displayed calendar.WeekNumberVisibility = Visibility.Visible ' by default the WeekRule is null and the week rule ' used is based on that of the culture (as specified ' by the FrameworkElement.Language property) but the ' WeekRule property can be used to override that ' setting calendar.WeekRule = Globalization.CalendarWeekRule.FirstFullWeek ' similarly the FirstDayOfWeek is null and is based on ' the information in the culture calendar.FirstDayOfWeek = DayOfWeek.Monday End Sub
using Infragistics.Windows.Editors; using Infragistics.Windows.Controls; using System.Globalization; private void InitializeCalendar(XamMonthCalendar calendar) { // by default the week numbers are not displayed calendar.WeekNumberVisibility = Visibility.Visible; // by default the WeekRule is null and the week rule // used is based on that of the culture (as specified // by the FrameworkElement.Language property) but the // WeekRule property can be used to override that // setting calendar.WeekRule = CalendarWeekRule.FirstFullWeek; // similarly the FirstDayOfWeek is null and is based on // the information in the culture calendar.FirstDayOfWeek = DayOfWeek.Monday; }