private void manualBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.Key == System.Windows.Input.Key.Enter)
{
this.Focus();
var ssvm = this.DataContext as SubredditSelectorViewModel;
if (ssvm != null)
ssvm.PinSubreddit.Execute(ssvm);
}
else
{
BindingExpression bindingExpression = ((TextBox)sender).GetBindingExpression(TextBox.TextProperty);
if (bindingExpression != null)
{
bindingExpression.UpdateSource();
}
}
}