コード例 #1
0
 private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
 {
     if (((EditValueViewModel)DataContext).IsInCreationMode)
     {
         KeyNameTextBox.Focus();
     }
     else
     {
         ValueContentControl.Focus();
     }
 }
コード例 #2
0
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            var viewModel = (CreateEditValueViewModel)DataContext;

            if (viewModel.IsCreate)
            {
                KeyNameTextBox.Focus();
            }
            else
            {
                ValueContentControl.Focus();
            }
        }