Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF: How to pass an instance of System.Type as the Binding.ConverterParameter via XAML?

I have some CLR type "MyType". Is it possible to pass the typeof(MyType) result as the Binding.ConverterParameter via XAML?

{Binding Converter={StaticResource myConverter}, **ConverterParameter=???**}
like image 725
Dennis Avatar asked Jan 20 '23 12:01

Dennis


1 Answers

You're looking for the {x:Type MyType} markup extension.

Note that you'll need to import an XML namespace for the type.

like image 110
SLaks Avatar answered Feb 12 '23 06:02

SLaks