Click or drag to resize

ReplaceTextConverter Class

A converter that converts the specified value by replacing text using a regular expression.
Inheritance Hierarchy

Namespace:  TomsToolbox.Wpf.Converters
Assembly:  TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 1.0.70.0
Syntax
[ValueConversionAttribute(typeof(string), typeof(string))]
public class ReplaceTextConverter : ValueConverter

The ReplaceTextConverter type exposes the following members.

Constructors
  NameDescription
Public methodReplaceTextConverter
Initializes a new instance of the ReplaceTextConverter class
Top
Properties
  NameDescription
Public propertyConvertBackErrorValue
Gets or sets the error value, which is returned whenever the value to convert back produces an error; the default is UnsetValue.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertBackNullValue
Gets or sets the null value, which is returned whenever the value to convert back is null; the default is null.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertBackUnsetValue
Gets or sets the unset value, which is returned whenever the value to convert back is UnsetValue; the default is UnsetValue.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertErrorValue
Gets or sets the error value, which is returned whenever the value to convert produces an error; the default is UnsetValue.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertNullValue
Gets or sets the null value, which is returned whenever the value to convert is null; the default is null.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertUnsetValue
Gets or sets the unset value, which is returned whenever the value to convert is UnsetValue; the default is UnsetValue.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyOptions
Gets or sets the RegexOptions used to find the string.
Public propertyPattern
Gets or sets the regular expression to find.

[CanBeNull]

Public propertyReplaceAll
Gets or sets a value indicating whether to replace all found instances or only the first.
Public propertyReplacement
Gets or sets the text to replace.

[CanBeNull]

Top
Methods
  NameDescription
Protected methodConvert(Object, Type, Object, CultureInfo)
Converts a value. Null and UnSet are unchanged.
(Overrides ValueConverterConvert(Object, Type, Object, CultureInfo).)
Public methodStatic memberConvert(String, String, String, RegexOptions, Boolean)
Converts the specified value by replacing text using a regular expression.

[CanBeNull]

Protected methodConvertBack
Converts a value.

[CanBeNull]

(Inherited from ValueConverter.)
Top
Extension Methods
  NameDescription
Public Extension MethodSafeCastT
Performs a cast from object to T, avoiding possible null violations if T is a value type.

[CanBeNull]

(Defined by ObjectExtensions.)
Top
See Also