I know this question has been asked before, but none of the "previous" answers seems to work for me...
I have implemented a functionality for multi languages in my application, and I therefor have to bind the header of my DataGrid columns to the DataContext.
I use a dictionary (called Text in the example below) in the DataContext to store the texts, and the binding works fine with textblocks, buttons etc.
<TextBlock Text="{Binding Text[Name], FallbackValue='Name'" />
But, I can't get this to work on the Header-attribute of the DataGrid columns.
I read somewhere, that I need to write a template for the column/header to achieve this, but I can't figure this out either.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…