UserControl正常情况下是不能被弹出的,而编写好的UserControl页面,为了查看效果,又需要弹出。

为了解决这个问题,UserControl需要一个Windows来接收。

var window = new Window();//Windows窗体
Jks jks = Jks();  //UserControl写的界面          
window.Content = jks;
window.Show();

这样就可以弹出UserControl界面来显示

相关文章:

  • 2022-03-04
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-24
  • 2022-12-23
  • 2022-02-27
  • 2022-12-23
  • 2022-12-23
  • 2021-09-10
  • 2022-12-23
相关资源
相似解决方案