none
"WindowsFormsHost in wpf with Prism not loading windows controls properly"

    Question

  • Hello,

    I'm working on prism 5.0 framework with .net 4.5 framework and using visual studio 2013.

    In my application I'm trying to load windows controls say "Button" or any other windows controls I'm not able to load them in wpf view where my wpf view is a usercontrol.

    I tried loading other control, I could only see "Tooltip" appearing for those controls but I could see my needed controls are not getting loaded in place.

    Example: I'm trying to load UltraLivewTileView here

    snippet :

       WindowsFormsHost host = new WindowsFormsHost();
                host.BringIntoView();
                host.Child = liveTileView2;
                try
                {
                    this.liveGroup.Content = host;
                }
                catch (Exception ex)
                {
                }

    where "liveGroup" is groupbox. 

    I tried working on sample of wpf windows loading  windowsforms controls it works fine.

    But looks like in application development this issue appearing. I compared all references and tried for work around but did not help.

    Can any has came across such issues?

    Please provide inputs for resolving this is issue.

    Thanks,

    Shesh

    Friday, October 23, 2015 11:13 AM

Answers

  • I'm using usercontrol as View here. 

    I tried changing it to window and see AllowTransperecny is false and Windowstate is set to normal.

    But in both of these cases my required controls are not getting loaded/not visible. IN user control only I can see is is tooltip for the controls loaded.

    Thanks,

    Shesh


    Your post is in the "Where Is" forum for direction on where best to ask questions. I'd try asking over here.

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=wpf%2Cwinforms&filter=alltypes&sort=lastpostdesc

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Monday, October 26, 2015 1:50 PM
    Moderator

All replies

  • I'd try them over here.

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=wpf%2Cwinforms&filter=alltypes&sort=lastpostdesc

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    • Proposed as answer by Mike Laughlin Friday, October 23, 2015 12:42 PM
    Friday, October 23, 2015 12:40 PM
    Moderator
  • I'm using usercontrol as View here. 

    I tried changing it to window and see AllowTransperecny is false and Windowstate is set to normal.

    But in both of these cases my required controls are not getting loaded/not visible. IN user control only I can see is is tooltip for the controls loaded.

    Thanks,

    Shesh

    Monday, October 26, 2015 5:07 AM
  • I'm using usercontrol as View here. 

    I tried changing it to window and see AllowTransperecny is false and Windowstate is set to normal.

    But in both of these cases my required controls are not getting loaded/not visible. IN user control only I can see is is tooltip for the controls loaded.

    Thanks,

    Shesh


    Your post is in the "Where Is" forum for direction on where best to ask questions. I'd try asking over here.

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=wpf%2Cwinforms&filter=alltypes&sort=lastpostdesc

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Monday, October 26, 2015 1:50 PM
    Moderator