Enables to declare standard string patterns to convert values in cells.

Namespace: Dapfor.Wpf.Converters
Assembly: Dapfor.Wpf (in Dapfor.Wpf.dll) Version: 4.1.0.26317 (4.1.0.26317)

Syntax

C#
public class ConverterAttribute : ConverterBaseAttribute
Visual Basic
Public Class ConverterAttribute
	Inherits ConverterBaseAttribute
Visual C++
public ref class ConverterAttribute : public ConverterBaseAttribute
F#
type ConverterAttribute =  
    class
        inherit ConverterBaseAttribute
    end

Remarks

Some formats greatly simplify application development. For example, StringConverter enables use of standard patterns for formatting values through String.Format():

 Copy imageCopy
column.ValueConverter = new StringConverter("### ### ### ###", string.Empty, " $");
The value 12345 is displayed as "12 345 $"

The following example demonstrates how to declare string pattern for a class property:

 Copy imageCopy
public class Product
{
    private DateTime maturity;

    [Converter("yyyy-MM-dd")]
    public DateTime Maturity
    {
        get { return maturity; }
    }
}

Inheritance Hierarchy

System..::..Object
  System..::..Attribute
    Dapfor.Wpf.Converters..::..ConverterBaseAttribute
      Dapfor.Wpf.Converters..::..ConverterAttribute

See Also