关注公众号及时获取文章更新 1、新建WPF用户控件; 2、修改XMAL,将UserControl改为Window; 3、并在后台代码中,将类的基类改为Window; 4、d:DesignHeight和d:DesignWidth改为Height和Width。