I have two columns in my XamDataGrid, one for displaying info in English, one for French. So I only want one of them in the FieldChooser depending on the language culture. I can do this in code, something like this,
For the English column:
if
(TranslationManager.Instance.CurrentLanguage.TwoLetterISOLanguageName.Equals("en"
))
unboundFieldSourceE.Settings.AllowHiding =
AllowFieldHiding
.Default;
else
.Never;
The code for the French column is the opposite. I'd like to know how to do this in Xaml through binding. It looks like that I have to write some sort of converter to accomplish it. I wonder if anyone has some experience o this.
Thanks a lot,
Shan
Hello Shan,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I created a custom Converter and set it as a Converter in the AllowHiding Binding. Also I set the instance of the Converter to be the Source of the Binding, because the DataContext in the FieldSetting is null and all the bindings should use static source Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Thanks Stefan,
It's exactly what I was looking for. I just have to modify the Converter to suit my needs.
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again