Class
ChatTimestampFormatter

Provides centralized formatting of TimeStamp values displayed by chat reply bubbles (both the in-conversation bubble and the input preview bubble).

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

cs-api-definition
public static class ChatTimestampFormatter

Inheritance: objectChatTimestampFormatter

Properties

DefaultTimestampFormat

Gets or sets the global default timestamp format string used when no per-instance format or formatter is configured. When null or empty, the built-in adaptive logic is used (short time for today's messages, short date + time otherwise).

Declaration

cs-api-definition
public static string DefaultTimestampFormat { get; set; }

Property Value

string

Methods

Format(DateTime, string, Func<DateTime, string>)

Formats the supplied timestamp using the configured resolution order. Returns Empty when timeStamp equals the default value.

Declaration

cs-api-definition
public static string Format(DateTime timeStamp, string format, Func<DateTime, string> formatter)

Parameters

timeStamp

DateTime

The timestamp to format.

format

string

An optional instance-level format string overriding the global default.

formatter

Func<DateTime, string>

An optional instance-level formatter delegate overriding all format strings.

Returns

string