[This is preliminary documentation and is subject to change.]

Attempts to convert user-typed text to number

Namespace: Tools.WindowsT.WPF.ControlsT
Assembly: Tools.Windows (in Tools.Windows.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
protected virtual decimal TextToValue(
	string text,
	decimal fallback
)
Visual Basic
Protected Overridable Function TextToValue ( _
	text As String, _
	fallback As Decimal _
) As Decimal
Visual C++
protected:
virtual Decimal TextToValue(
	String^ text, 
	Decimal fallback
)
F#
abstract TextToValue : 
        text:string * 
        fallback:decimal -> decimal 
override TextToValue : 
        text:string * 
        fallback:decimal -> decimal 
JScript
protected function TextToValue(
	text : String, 
	fallback : decimal
) : decimal

Parameters

text
Type: System..::..String
Text to converts
fallback
Type: System..::..Decimal
Value to be retuned if text cannot be converted to decimal

Return Value

text converted to number. It conversion is not possible returns fallback. Return value should be acceptable by Minimum, Maximum and DecimalPlaces constraints.

This implementation utilizes CoerceValue(DependencyObject, Object)

See Also