'Declaration Public Enum UltraMonthViewSingleState Inherits System.Enum
public enum UltraMonthViewSingleState : System.Enum
Member | Description |
---|---|
ActivityInEditMode | An activity (Infragistics.Win.UltraWinSchedule.Appointment or Infragistics.Win.UltraWinSchedule.Note) is currently being edited. Note:Infragistics.Win.UltraWinSchedule.Holiday objects are not editable via the user interface. |
ActivityIsLocked | The activity's Locked property is true. |
AppointmentInEditMode | The activity in edit mode is an Infragistics.Win.UltraWinSchedule.Appointment. |
AutoAppointmentDialogEnabled | The value of the control's Infragistics.Win.UltraWinSchedule.UltraMonthViewSingleBase.AutoAppointmentDialog property is True. |
Day | The Infragistics.Win.UltraWinSchedule.UltraCalendarInfo.ActiveDay is not null (Nothing in VB). |
DayFirst | The Infragistics.Win.UltraWinSchedule.UltraCalendarInfo.ActiveDay is the same day as the day represented by the control's Infragistics.Win.UltraWinSchedule.UltraMonthViewSingle.FirstVisibleDay property. |
DayFirstInWeek | The Infragistics.Win.UltraWinSchedule.UltraCalendarInfo.ActiveDay is the first visible day in its week. |
DayIsCompressedSaturday | The current pivot item is a Infragistics.Win.UltraWinSchedule.Day that represents a Saturday, and the Infragistics.Win.UltraWinSchedule.UltraMonthViewSingle.WeekendDisplayStyle property is set to Compressed |
DayIsCompressedSunday | The current pivot item is a Infragistics.Win.UltraWinSchedule.Day that represents a Sunday, and the Infragistics.Win.UltraWinSchedule.UltraMonthViewSingle.WeekendDisplayStyle property is set to Compressed |
DayLast | The Infragistics.Win.UltraWinSchedule.UltraCalendarInfo.ActiveDay is the last day in the control that is currently visible. |
NextDayIsInMinMaxRange | The next visible, enabled day (relative to the ActiveDay) is within the range imposed by the MinDate and MaxDate properties. |
NoSelectedActivities | The total combined count of the Infragistics.Win.UltraWinSchedule.UltraCalendarInfo.SelectedAppointments, Infragistics.Win.UltraWinSchedule.UltraCalendarInfo.SelectedNotes, and Infragistics.Win.UltraWinSchedule.UltraCalendarInfo.SelectedHolidays collections is zero. |
NoteInEditMode | The activity in edit mode is a Infragistics.Win.UltraWinSchedule.Note. |
PivotItemIsActivity | The current pivot item is an activity (Infragistics.Win.UltraWinSchedule.Appointment, Infragistics.Win.UltraWinSchedule.Note or Infragistics.Win.UltraWinSchedule.Holiday). |
PivotItemIsDay | The current pivot item is a Infragistics.Win.UltraWinSchedule.Day. |
PreviousDayIsInMinMaxRange | The previous visible, enabled day (relative to the ActiveDay) is within the range imposed by the MinDate and MaxDate properties. |
SelectedAppointments | There exists at least 1 Infragistics.Win.UltraWinSchedule.Appointment whose Infragistics.Win.UltraWinSchedule.Appointment.Selected property is True. |
The values of the UltraMonthViewSingleState enumeration are bit flags. The value of the control's Infragistics.Win.UltraWinSchedule.UltraMonthViewSingle.CurrentState property will return a value that is equal to a combination of zero or more of these bit flags.
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports Infragistics.Win.UltraWinSchedule.MonthViewSingle Private Sub GetCurrentState() Dim info As String = "The control is in the following state(s):" + vbCrLf + vbCrLf ' The CurrentState property is expressed in terms of bit flags, ' since the control can be in more than one distinct state at any ' given time. We will strip each bit that is set until we are left with ' no set bits, recording the corresponding state value with each iteration. Dim state As Long = Me.ultraMonthViewSingle1.CurrentState Dim mask As Long = 1 While (state > 0) ' See if the bit that corresponds to the current value of the mask ' is set if it is, get the name of the enumeration for that state If ((state And mask) <> 0) Then Dim comboState As UltraMonthViewSingleState = mask info += comboState.ToString() + vbCrLf ' Strip out the bit so we know when to exit this while loop state = state And (Not mask) End If ' Multiply the mask by 2 to set it to the next power of 2, ' effectively shifting the bit position we are checking one ' place to the right mask *= 2 End While ' Display the state information in a message box MessageBox.Show(info, "GetCurrentState", MessageBoxButtons.OK) End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using Infragistics.Win.UltraWinSchedule.MonthViewSingle; using System.Diagnostics; private void GetCurrentState() { string info = "The control is in the following state(s):" + "\n" + "\n"; // The CurrentState property is expressed in terms of bit flags, // since the control can be in more than one distinct state at any // given time. We will strip each bit that is set until we are left with // no set bits, recording the corresponding state value with each iteration. long state = (long)this.ultraMonthViewSingle1.CurrentState; long mask = 1; while ( state > 0 ) { // See if the bit that corresponds to the current value of the mask // is set; if it is, get the name of the enumeration for that state if ( ( state & mask ) != 0 ) { UltraMonthViewSingleState comboState = (UltraMonthViewSingleState)( mask ); info += comboState.ToString() + "\n"; // Strip out the bit so we know when to exit this while loop state &= ~mask; } // Multiply the mask by 2 to set it to the next power of 2, // effectively shifting the bit position we are checking one // place to the right mask *= 2; } // Display the state information in a message box MessageBox.Show( info, "GetCurrentState", MessageBoxButtons.OK ); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2