private void OnLoaded(object sender, RoutedEventArgs routedEventArgs) { if (((EditValueViewModel)DataContext).IsInCreationMode) { KeyNameTextBox.Focus(); } else { ValueContentControl.Focus(); } }
private void OnLoaded(object sender, RoutedEventArgs e) { var viewModel = (CreateEditValueViewModel)DataContext; if (viewModel.IsCreate) { KeyNameTextBox.Focus(); } else { ValueContentControl.Focus(); } }