Is there a way to get WPF to automatically apply the Converter binding to all bindings of a certain type?
I saw this question , but it covers a different case (localization) and therefore does not have satisfactory answers.
My problem: I have model classes containing Commands that I would like to bind to WPF commands. Since model classes are not instrumental, I cannot implement WPF ICommand . Instead, I have a CommandConverter that wraps CommandModel in WPF ICommand s:
<Button Command="{Binding MyCommand, Converter={StaticResource CommandConverter}}" />
This works very well, except that it is easy to forget about Converter= , and WPF does not give any indication that the binding failed.
Now my question is: is it possible to force WPF to always apply the converter to certain types of bindings? Or, alternatively, how can I get WPF to give me the correct errors when command binding fails?
source share