Hi Girls and Guys!
I'm just about to start a new project of mine and am currently evaluating some techniques for localization, modularity etc.
I have (at least in my opinion) a pretty good approach to localization but now I struggle to find a good solution for databinding.
I want to bind values of textfields etc. (UIElements in general) to a specific method in the DataContext of the form. The method looks like this:
public void GetValue(string name)
where name is a "path" in the form of "node/subnode/subsubnode". I thought about using a ValueConverter for the binding and this worked out pretty good till now.
My binding expression looks like that:
{Binding Path=Localization, Converter={StaticResource LocalizationConverter}, ConverterParameter=PrismBreak/Shell.xaml/New}
I think that this binding expression although doing its job is kinda blown up to use for every single UIElement. So I thought if it was possible to define a default ValueConverter for a certain type (--> whenever that type is bound to somewhere that ValueConverter is used).
Is that possible in WPF?
If it's not possible is there any other good way to bind to a method with dynamic parameters?
Thanks in advance and best regards,
Chris