I am going to start a new project, and currently I am evaluating some methods of localization, modularity, etc.
I have (at least in my opinion) a pretty good approach to localization, but now I'm trying my best to find a good solution for data binding.
I want to bind the values โโof text fields, etc. (in general, UIElements) to a specific method in the DataContext of the form. The method is as follows:
public void GetValue(string name)
where name is the "path" in the form of "node / subnode / subsubnode". I was thinking about using ValueConverter for binding, and so far it has been very nice.
My required expression is as follows:
{Binding Path=Localization, Converter={StaticResource LocalizationConverter}, ConverterParameter=PrismBreak/Shell.xaml/New}
I think this mandatory expression, although it does its job, is blown up to use it for every UIElement. So I thought, is it possible to determine the default ValueConverter value for a particular type (-> whenever this type is bound to where ValueConverter is used).
Is this possible in WPF?
If this is not possible, is there another good way to bind to a method with dynamic parameters?
Thanks in advance and best regards,
Chris
source share