private void EntityCustomDataEditor_OnLoaded(object sender, RoutedEventArgs e) { var entityCustomDataViewModel = DataContext as EntityCustomDataViewModel; if (entityCustomDataViewModel != null && entityCustomDataViewModel.IsMaskedTextBoxVisible) { EntityNameEdit.BackgroundFocus(); } else { EntityNameEdit2.BackgroundFocus(); } }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { EntityNameEdit.BackgroundFocus(); }