private void button_write_Click(object sender, RoutedEventArgs e) { if (comboBox_writePlugIn.SelectedItem != null) { string name = comboBox_writePlugIn.SelectedItem as string; string filePath = SettingPath.ModulePath + "\\Write\\" + name; WritePlugInClass plugin = new WritePlugInClass(); HwndSource hwnd = (HwndSource)HwndSource.FromVisual(this); plugin.Setting(filePath, hwnd.Handle); } }