Skip to content

Interface IValueConverter

Definition

Namespace: StardewUI.Framework.Converters
Assembly: StardewUI.dll

Provides a method to convert between arbitrary types.

public interface IValueConverter

Remarks

This is a non-generic version of the IValueConverter<TSource, TDestination> that should normally only be used by framework code. Avoid implementing this directly; instead prefer the generic version, which implicitly implements this interface.

Members

Properties

Name Description
DestinationType The type of object that this converts to; the result type of the Convert(Object) method.
SourceType The type of object this converts from; the value argument to the Convert(Object) method.

Methods

Name Description
Convert(Object) Converts a value from the SourceType to the DestinationType.

Details

Properties

DestinationType

The type of object that this converts to; the result type of the Convert(Object) method.

System.Type DestinationType { get; }
Property Value

Type


SourceType

The type of object this converts from; the value argument to the Convert(Object) method.

System.Type SourceType { get; }
Property Value

Type


Methods

Convert(Object)

Converts a value from the SourceType to the DestinationType.

System.Object Convert(System.Object value);
Parameters

value   Object
The value to convert.

Returns

Object

The converted value.