Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Private Sub SetupNote()
' Add a new Note object to the component's Notes collection
' for the current date
Dim note As Note = Me.ultraCalendarInfo1.Notes.Add(DateTime.Today)
' Make sure we have the right starting date
Debug.Assert((note.Date = DateTime.Today.Date), "Error creating the note.")
' Set the description
note.Description = "My Note"
' Hide the note if the day with which it is associated is disabled
If (Not note.Day.EnabledResolved) Then
note.Visible = False
End If
' Lock the note so the end user cannot modify its description
' or change the day with which it is associated
note.Locked = True
' If the note is selected, deselect it
If (note.IsSelected) Then
note.Selected = False
End If
End Sub