[英]WinForms with WPF UserControl which shows another window
I have a problem with input interoperation in WinForms and WPF. 我在WinForms和WPF中的输入互操作有问题。
Winforms/C#: Winforms / C#:
UserControlDLL.MyUserControl userControl = new UserControlDLL.MyUserControl();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
userControl.ShowTextBox();
}
WPF: WPF:
public partial class MyUserControl : UserControl
{
internal static DisplayWindow display;
public MyUserControl()
{
InitializeComponent();
display = new DisplayWindow();
}
}
When userControl creates the new DisplayWindow I can't enter anything in the textbox on the DisplayWindow. 当userControl创建新的DisplayWindow时,我无法在DisplayWindow的文本框中输入任何内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.