WPF Converters

Kailash Chandra Behera | Monday, July 04, 2016

Introduction

Binding in WPF helps flow data from one object to another object, when the datatype of source and target are same, when the datatype of source and target are different converters are required.This article describes about WPF converters, the types of converters available in WPF and the uses of them.

Getting Started

In WPF Binding data flows from one object to another object, the object that emits data is called source and the object that accepts the data is called the target.This data transfer happens when the datatype of source and target are same.

The WPF converters acts as a bridge between the source and the target if the source and target have different data formats or need some conversion. For example, sometimes we need to convert data from one format to another format, when it flows from the source to the target or vice-versa the conversion is required.

Types of Converters

  1. Value Converters

    A Value Converter is required when the datatype of source and target are different for instance you have a text box and a button control. You want to enable or disable the button control when the text of the text box is filled or null.

  2. MultiValue Coverters

    A MultiValue Coverter is required when your target is bound with multiple sources and the source and targets have different data formats or need some conversion.

Related Articles

  1. Resource in WPF
  2. WPF Dispatcher
  3. WPF Binding
  4. WPF Style
  5. WPF MultiValue Converter
  6. WPF Value Converters

Summary

In this article we have discussed about the converter and type of converts are available in WPF, hope this article will make you helf ful

Thanks