简体   繁体   English

WPF UserControl容器C#VS 2010

[英]WPF UserControl Container C# VS 2010

I have a problem because y want to create a UserControl that can have a functionality as a container. 我有一个问题,因为y要创建一个可以作为容器具有功能的UserControl。

I used the link: 我使用了链接:

http://support.microsoft.com/kb/813450/en-us?fr=1 http://support.microsoft.com/kb/813450/en-us?fr=1

but i suposed that this part don't work for WPF 4.0: 但我认为这部分不适用于WPF 4.0:

[Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(IDesigner))] public class UserControl1 : System.Windows.Forms.UserControl { [Designer(“ System.Windows.Forms.Design.ParentControlDesigner,System.Design”,typeof(IDesigner))]公共类UserControl1:System.Windows.Forms.UserControl {

  ...

} }

Please Help Me¡¡¡¡¡ 请帮我

You are using Forms UserControl... 您正在使用Forms UserControl ...

Start using WPF UserControl instead and all will be well! 开始使用WPF UserControl ,一切都会好起来!

public class UserControl1 : System.Windows.Controls.UserControl

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM