Converts to and from decimal format.
This converter is useful for the WpfSpinner, whose Value property is a decimal. It should only be used if the data you are modeling is an Int32.
Public Member Functions |
|
override object | ProvideValue (IServiceProvider serviceProvider) |
Implements MarkupExtension to return
IntegerToDecimalConverter.Converter.
|
|
object | Convert (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
Converts from an int to a decimal format.
|
|
object | ConvertBack (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
Rounds the decimal value to the nearest
integer, using Math.Round(decimal) |
|
Static Public Attributes |
|
static
readonly IntegerToDecimalConverter |
Converter = new IntegerToDecimalConverter() |
Default, reusable instance of this
converter. |
override object WPFCustomControls::Converters::IntegerToDecimalConverter::ProvideValue | ( | IServiceProvider | serviceProvider | ) | [inline] |
Implements MarkupExtension to return IntegerToDecimalConverter.Converter.
serviceProvider | ignored |
object WPFCustomControls::Converters::IntegerToDecimalConverter::Convert | ( | object | value, |
Type | targetType, | ||
object | parameter, | ||
System.Globalization.CultureInfo | culture | ||
) | [inline] |
Converts from an int to a decimal format.
value | int value |
targetType | ignored |
parameter | ignored |
culture | ignored |
object WPFCustomControls::Converters::IntegerToDecimalConverter::ConvertBack | ( | object | value, |
Type | targetType, | ||
object | parameter, | ||
System.Globalization.CultureInfo | culture | ||
) | [inline] |
Rounds the decimal value to the nearest integer, using Math.Round(decimal)
value | decimal value |
targetType | ignored |
parameter | ignored |
culture | ignored |
readonly
IntegerToDecimalConverter
WPFCustomControls::Converters::IntegerToDecimalConverter::Converter
= new
IntegerToDecimalConverter() [static] |
Default, reusable instance of this converter.