WPF in MFC App

hi all,
  I am experimenting adding WPF controls to an existing MFC app.  Everything seems to work fine except that everytime i make changes to the WPF control xaml, the hole MFC app recompile itself.  I looked at the sample app in the handon lab, and it does the same thing.  Is there a way to get around this


jz


Answer this question

WPF in MFC App

  • Csabi

    I am not familiar with the code of the hands on lab. But the following usually happens when a user-defined header is included in stdafx.h. Perhaps each time when you change XAML, it changes a specific header file in WPF project. Same header is included in stdafx.h of the MFC Project. If WPF's headers is changed, IDE is going to recompile pre-compiled header (stdafx.h) and then re-build whole MFC project.

    Nikola

    VC++



  • JohnYe

    Hi,

     

    This usually happens because of IDE detecting that a piece of code that other code depends on has been changed. Are these two projects One project with several files How does MFC code knows about WPF control #include, added reference on a project level

    Nikola

    VC++

     



  • Lelle

    I follow the same structure as the Hands On Lab Example.   One solution contains two seperate projects.  One is the WPF control, the other is an exesting MFC app.  A reference to the WPF project is added in the MFC project. 

  • WPF in MFC App