title: PasswordBox in CellTemplate goes empty after double click
body: <p>I use WPF and MVVM for a project and have the following problem: When I double click on my Password DataGrid cell and then focus on another cell, the PasswordBox in the CellTemplate goes empty. The TextBox on the other hand keeps its value. (This doesn't happen when I use tab.)</p>
  
  <p>Here is the XAML code of my cell:</p>
  
  <pre><code>&lt;DataGridTemplateColumn Header="Password"&gt;
                  &lt;DataGridTemplateColumn.CellTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;PasswordBox VerticalContentAlignment="Center"
                                       Focusable="False" IsEnabled="False"
                                       basics:PasswordBoxAssistant.BindPassword="True"  
                                       basics:PasswordBoxAssistant.BoundPassword="{Binding Path=Password, Mode=OneWay, ValidatesOnNotifyDataErrors=True}"/&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/DataGridTemplateColumn.CellTemplate&gt;
                  &lt;DataGridTemplateColumn.CellEditingTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;TextBox  VerticalContentAlignment="Center" 
                                    Text="{Binding Path=Password, ValidatesOnNotifyDataErrors=True, UpdateSourceTrigger=PropertyChanged}"/&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/DataGridTemplateColumn.CellEditingTemplate&gt;
  &lt;/DataGridTemplateColumn&gt;
  </code></pre>
  
  <p>Because I want to use bindings for my PasswordBox I used the PasswordHelper as defined here: <a href="http://blog.functionalfun.net/2008/06/wpf-passwordbox-and-data-binding.html" rel="nofollow">http://blog.functionalfun.net/2008/06/wpf-passwordbox-and-data-binding.html</a></p>
  
  <p>I'm pretty new to WPF and couldn't find anything helpful online. </p>
  
  <p><strong>Edit</strong></p>
  
  <p>I changed the PasswordBox to a TextBox and used a converter to change the String to look like a password. Now it works fine and looks like I want it to look! (And it's easier too. The PasswordBox combined with the Helper I used seems to bug a bit.)</p>