I have resources like Formatted by {0} on x
Approach #1
In the backend (.cs file), we create a parameter like so:
string FormattedString = string.format(getResource("abc"), userId);
and use the FormmatedString directly in the xaml file.
Approach #2
Use a custom StringFormatConverter, that takes Resource name as ConverterParameter and in the converter backend get the resource and format it and apply directly in the xaml.
Approach #1, if the original string changes it's value, we have to raise a NotifyPropertyChanged call, but in approach #2 that is eliminated plus the number of parameters also reduces.
Please advice on whether the #2 approach is feasible or is it better to stick with the first approach? and if by using the #2 approach does it make the Front end heavy?
If #2 approach is feasible, please advise on how we can in cooperate multiple bindings if the resource string is like Formatted by {0} on {1}
where two places need to be filled.
p.s. I'm using Winui 3