'宣言 Public ReadOnly Property WeeksOfYear As WeeksOfYearCollection
public WeeksOfYearCollection WeeksOfYear {get;}
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports System.IO Imports System.Globalization Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click ' 年の週を繰り返します Dim weekOfYear As WeekOfYear For Each weekOfYear In Me.ultraCalendarInfo1.WeeksOfYear ' 週番号が 5 で割り切ることができる場合、無効にします If ((weekOfYear.WeekNumber Mod 5) = 0) Then weekOfYear.Enabled = False End If Next End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.IO; using System.Globalization; private void button1_Click(object sender, System.EventArgs e) { // 年の週を繰り返します foreach ( WeekOfYear weekOfYear in this.ultraCalendarInfo1.WeeksOfYear ) { // 週番号が 5 で割り切ることができる場合、無効にします if ( ( weekOfYear.WeekNumber % 5 ) == 0 ) weekOfYear.Enabled = false; } }