'宣言 Public Property DateSelectionType As DateSelectionType
public DateSelectionType DateSelectionType {get; set;}
UltraCalendarInfo.SelectTypeDay を介して、UltraCalendarCombo コントロールは複数の選択が可能ですが、編集部分は1 つの日付しか保持できないため、コントロールは保存する日付を認識する必要があります。DateSelectionTypeは、保存される最も早い選択日、または最も遅い選択日のいずれかを持つように設定できます。
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports Infragistics.Win.UltraWinSchedule.CalendarCombo Private Sub CustomizeSelectionBehavior() ' Don't alter selection when the dropdown appears Me.ultraCalendarCombo1.AutoSelect = False ' Automatically update the control when the associated UltraCalendarInfo ' object's SelectedDateRanges collection changes Me.ultraCalendarCombo1.AutoSelectionUpdate = True ' Don't automatically close the dropdown when a date is selected Me.ultraCalendarCombo1.AutoCloseUp = False ' Display the latest selected date in the edit portion Me.ultraCalendarCombo1.DateSelectionType = DateSelectionType.LatestSelectedDay End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using Infragistics.Win.UltraWinSchedule.CalendarCombo; private void CustomizeSelectionBehavior() { // Don't alter selection when the dropdown appears this.ultraCalendarCombo1.AutoSelect = false; // Automatically update the control when the associated UltraCalendarInfo // object's SelectedDateRanges collection changes this.ultraCalendarCombo1.AutoSelectionUpdate = true; // Don't automatically close the dropdown when a date is selected this.ultraCalendarCombo1.AutoCloseUp = false; // Display the latest selected date in the edit portion this.ultraCalendarCombo1.DateSelectionType = DateSelectionType.LatestSelectedDay; }