private void btnSetting_Click(object sender, RoutedEventArgs e) { KeyboardWindow kw = new KeyboardWindow(); kw.kbList = this.kbList; kw.SelectedKeyboard = SelectedDeviceName; kw.SelecetBarcodeEvent += new KeyboardWindow.SelecetBarcodeEventHandler(BarcodeSetting); //새창을 가운대로 kw.Owner = Application.Current.MainWindow; // We must also set the owner for this to work. kw.WindowStartupLocation = WindowStartupLocation.CenterOwner; kw.ShowDialog(); txtTotalAmount.Focus(); }