New to Telerik UI for WinForms? Start a free 30-day trial

Provides the shared date/time format patterns used by Scheduler timeline views.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

C#
public static class DateTimeFormats

Inheritance: objectDateTimeFormats

Methods

Replaces the current contents of the shared list with the built-in format patterns.

C#
public static void AddDefaultFormats()

Adds the format string.

C#
public static bool AddFormat(string formatString)
Parameters:formatStringstring

The format string.

Returns:

bool

Resets the shared list to the built-in defaults and returns that mutable list. Custom entries in the list are discarded.

C#
public static List<string> GetDateTimeFormats()
Returns:

List<string>

The shared list of built-in date/time format patterns.

Inserts a format string.

C#
public static bool Insert(int index, string formatString)
Parameters:indexint

The index.

formatStringstring

The format string.

Returns:

bool

Removes the format at the specified position in the shared list.

C#
public static bool RemoveAt(int index)
Parameters:indexint

The zero-based position of the format to remove.

Returns:

bool

true after the item is removed.

Exceptions: ArgumentOutOfRangeException

The index is outside the list bounds.

Removes the format string.

C#
public static bool RemoveFormat(string formatString)
Parameters:formatStringstring

The format string.

Returns:

bool