Command BindingParameter Bool

14Apr

Have you ever been in the case, that you need a BindingParameter of Type boolean? If you try to set it directly via XAML by using True or False as CommandParemer you will get stuck, because this will not work. You can’t directly cast an object of type String to an object of type bool.
Using following won’t work.

But, this is not what I wanted. You certainly agree with me that doing this all the time when you need a boolean in XAML can be very anoying. So what can you use as solution?
What I did is creating a helper class named BooleanHelper providing a property for each of both boolean values. Below you can see how i did that