Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Form Designer loading problem
 

Form Designer loading problem

Hi,

I am having a form containing ElementHost control which host WPF user control contains MediaElement control which plays .wmv file on loading.

when I try to open the form in designer mode I am getting following error-

Events cannot be set on the object passed to the event binding service because a site associated with the object could not be located.

please I need urgent help.

Thanks and regards,
Prabi
Prabi  Thursday, May 28, 2009 6:03 AM

Hi Prabi,

Once you host a WPF control into winform project, you should add it in the code not designer. Like the sample shown
http://msdn.microsoft.com/en-us/library/ms745781.aspx

I have made a test to host a WPF control into winform form(Form1) in the code, then create another form(Form2) to inherited from this one. When I open Form2 in the designer, it cannot be shown and error occur. It reads: Cannot locate resource 'conecontrol.xaml'.

After consulting for this. I know that WPF control cannot be shown in winform at design time. It only available at run time.

If I misunderstood you or the step I took different from yours, please feel free to tell me.

Sincerely,
Kira Qian


Please mark the replies as answers if they help and unmark if they don't.
  • Marked As Answer byPrabi Tuesday, June 02, 2009 4:53 AM
  •  
Kira Qian  Monday, June 01, 2009 2:39 AM

Hi Prabi,

Once you host a WPF control into winform project, you should add it in the code not designer. Like the sample shown
http://msdn.microsoft.com/en-us/library/ms745781.aspx

I have made a test to host a WPF control into winform form(Form1) in the code, then create another form(Form2) to inherited from this one. When I open Form2 in the designer, it cannot be shown and error occur. It reads: Cannot locate resource 'conecontrol.xaml'.

After consulting for this. I know that WPF control cannot be shown in winform at design time. It only available at run time.

If I misunderstood you or the step I took different from yours, please feel free to tell me.

Sincerely,
Kira Qian


Please mark the replies as answers if they help and unmark if they don't.
  • Marked As Answer byPrabi Tuesday, June 02, 2009 4:53 AM
  •  
Kira Qian  Monday, June 01, 2009 2:39 AM

You can use google to search for other answers

Custom Search

More Threads

• query regarding the Autos and Locals windows in .net 2003 environment
• Notification when component deleted?
• Custom Controls Question
• How to have text size adjust to fill space.
• Please Please help!!! How do you disable a listview item
• Splash Screen Controls becoming transparent at load time.
• Changing the font color in a RichTextBox
• Outlook2003 web Access Look&Feel
• move cursor right in datagridview
• when a window is in maximized state, the restore button should be disabled