title: WPF - Datagrid translations in header replaced by key: when opening new window
body: <p>I cannot show all the code, details, ... regarding this case, so I will make it as clear a possible. Sorry for that. </p>
  
  <p>We have a translated dataGrid in WPF. Where translations are loaded in Header with a code behind method as follows: </p>
  
  <pre><code> string[] headerDictionary =
                  {
                      Properties.Resources.XXX,
                      (...) all your ressources here
  
                  };
  
              for (int i = 0; i &lt; this.ResultDataGrid.Columns.Count; i++)
              {
                  DataGridColumn dgc = this.ResultDataGrid.Columns[i];
                  dgc.Header = headerDictionary[i];
                  dgc.Width = DataGridLength.SizeToCells;
              }
  </code></pre>
  
  <p>This is because we change langages and without this, the language in the header will not be adapted. </p>
  
  <p>To solve my problem, I tried to remove this, does not help. </p>
  
  <p>Moreover, in xaml we have smoething like this for translations: </p>
  
  <pre><code> Header="{lex:LocTextExtension keyHere}"
  </code></pre>
  
  <p>So, on a search page, we show the results in a part (Result list), handled with Prism.</p>
  
  <p>On this part, we have an alt+double click option to open the record in a news window. </p>
  
  <p>When open the new window, and only in this case, we loose the translations in the dataGrid headers. They are replaced by key:xxxxxx. </p>
  
  <p>If I remove the code behind for translations, then the Grid translation is not adapted for a language change. </p>
  
  <p>I tried: 
  - remove all special code
  - Change culture twice to force reload language
  - Change method for translation. </p>
  
  <p>Nothing works. </p>
  
  <p>The only think I can demonstrate is, that it is linked with opening a new window. </p>
  
  <p>Are you aware of such problems? Have someone an idea how to solve this? </p>
  
  <p>Thanks in advance for support. </p>