Reputation: 567
I've got a question about the binding of checkboxes. Is it possible to bind a WPF checkbox to a string with "true" or "false". I don't want to use the boolean variable in binding
<CheckBox x:Name="myCheckBox" IsChecked="{Binding someBooleanVariable}"/>
I want to to do something like
<CheckBox x:Name="myCheckBox" IsChecked="{Binding someStringVariable}"/>
I need that because I want to bind a part of my UI to a Hashmap containing strings. But the UI consists of Textboxes, Checkboxes and Radiobuttons. I want to bind my UI Elements to a function with a parameter for the key of the hashmap. And the function shall return the value of the given key as a string.
Upvotes: 0
Views: 2736