Version

Format Property (UltraCalendarCombo)

Determines the format that is used to display the date when the control is not in edit mode.
Syntax
'Declaration
 
Public Property Format As String
public string Format {get; set;}
Remarks

The format property is used to format the Value for display when the control is not in edit mode and the Value is not null (Nothing in VB). The format is also used to parse the date entered into the edit portion.

Example
This example configures the control to apply the current culture's LongDatePattern to the date that is displayed by the control. If the DateTimeFormatInfo property has been explicitly set, it prompts the user to make sure they want to change it.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.CalendarCombo

    Private Sub SetLongDateFormat()

        '	If the DateTimeFormatInfo property is set, prompt the user
        If (Not Me.ultraCalendarCombo1.DateTimeFormatInfo Is Nothing) Then
            Dim info As String = String.Empty
            info += "A custom DateTimeFormat has been specified for the control." + vbCrLf
            info += "Do you still want to apply the current culture's LongDatePattern?"
            Dim result As DialogResult = MessageBox.Show(info, "SetLongDateFormat", MessageBoxButtons.OK)
            If (result = DialogResult.No) Then Return
        End If

        '	Get the current culture's LongDatePattern
        Dim longDate As String = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern

        '	Set the control's Format property to the long date format string
        Me.ultraCalendarCombo1.Format = longDate

    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using Infragistics.Win.UltraWinSchedule.CalendarCombo;

		private void SetLongDateFormat()
		{
			
			//	If the DateTimeFormatInfo property is set, prompt the user
			if ( this.ultraCalendarCombo1.DateTimeFormatInfo != null )
			{
				string info = string.Empty;
				info += "A custom DateTimeFormat has been specified for the control." + "\n";
				info += "Do you still want to apply the current culture's LongDatePattern?";
				DialogResult result = MessageBox.Show( info, "SetLongDateFormat", MessageBoxButtons.OK );
				if ( result == DialogResult.No )
					return;
			}

			//	Get the current culture's LongDatePattern
			string longDate = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern;

			//	Set the control's Format property to the long date format string
			this.ultraCalendarCombo1.Format = longDate;

		}
Requirements

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

See Also