Home > Net >  WPF form laminated problem? O great god answer
WPF form laminated problem? O great god answer

Time:09-27

Questions as follows:
I created a Windows forms with WPF, it creates a container, initialization time UserControl form filling into the Windows forms of container, this step is no problem, then I created a buttion on UserControl form button and add a click event for the button, click on the trigger, the another UserControl forms clamshell UserControl current form, the runtime breakpoint is through no problem, not an error, but also does not show
The code is: the parent form (Windows). Interface. The Content="";
Parent form (Windows). Interface. The Content=new form b ();
Note: the parent form (Windows). Interface. The Content is a Windows forms created by the container
This way to write he is not an error nor show another form, don't know whether laminated, or what the reason, please answer

CodePudding user response:

Many forms used in WPF positioning, etc., you can refer to the
http://bbs.cskin.net/thread-15559-1-1.html

CodePudding user response:

Don't use Windows form as the content of the content in the form level content assignment operation, which is your parent window, through the custom event in the usercontrol to implement it,

CodePudding user response:

refer to the second floor exception92 response:
don't use Windows form as the content of the content, the form level content assignment operation, which is your parent window, through the custom event in the usercontrol to implement it,

Is the parent form format Usercontrol instead?

CodePudding user response:

reference weixin_42555796 reply: 3/f
Quote: refer to the second floor exception92 response:

Don't use Windows form as the content of the content in the form level content assignment operation, which is your parent window, through the custom event in the usercontrol to implement it,

Is the parent form format Usercontrol instead?

Yes, only support a window a root node,
  •  Tags:  
  • C#
  • Related