Class
LabelFormatterBase<T>

Provides a base class for label formatters that convert typed values to string representations. This abstract class implements ILabelFormatter to provide type-safe label formatting functionality.

Definition

Namespace:Telerik.Maui.Controls.Compatibility.Chart

Assembly:Telerik.Maui.Controls.Compatibility.dll

Type Parameters:

T

The type of values that this formatter can handle.

Syntax:

cs-api-definition
public abstract class LabelFormatterBase<T> : ILabelFormatter

Inheritance: objectLabelFormatterBase<T>

Implements: ILabelFormatter

Constructors

LabelFormatterBase()

Declaration

cs-api-definition
protected LabelFormatterBase()

Properties

ConvertionContext

Gets the conversion context for the formatter.

Declaration

cs-api-definition
public virtual object ConvertionContext { get; }

Property Value

object

The conversion context object, or null if no context is available.

Implements ILabelFormatter.ConvertionContext

ValueType

Gets the type of values that this formatter handles.

Declaration

cs-api-definition
public Type ValueType { get; }

Property Value

Type

The Type representing the value type T.

Implements ILabelFormatter.ValueType

Methods

FormatTypedValue(T)

Formats a typed value into a string representation.

Declaration

cs-api-definition
public abstract string FormatTypedValue(T value)

Parameters

value

T

The value of type T to format.

Returns

string

A string representation of the formatted value.

FormatValue(object)

Formats an object value into a string representation. This method casts the object to type T and calls FormatTypedValue(T).

Declaration

cs-api-definition
public string FormatValue(object value)

Parameters

value

object

The value to format, which will be cast to type T.

Returns

string

A string representation of the formatted value.

Implements ILabelFormatter.FormatValue(object)