What is the difference between TypeConverters and MarkupExtension ?
What is the difference between TypeConverters and MarkupExtension ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
TypeConverters are used to implicitly convert one type to another. For example, the BrushConverter can convert the string “Red” to a SolidColorBrush whose Color property is set to red. As in this case:
MarkupExtension allow you to provide more customized values to properties. There are also a few special markup extensions, Binding, MultiBinding, and DynamicResource. These do more than just provide a static value, and instead provide a more dynamic value.
So you could build markup extensions that perform the same operations as type converters, but then you would have to explicitly use them, versus the implicit nature of type converters.