Udostępnij za pośrednictwem


SketchFlow Build Error - “The Name ‘InitializeComponent’ does not exist in the current context”

This is my first real go round with Expression Blend and SketchFlow and it is taking quite a while to get used to it.  After several iterations of names and screen dragging, dropping in the SketchFlow Map, and adding a few elements to some screens, I decided to try and run my recently created Silverlight SketchFlow project.  To my surprise I received error message and a broken build.  How could I get a build break if I didn’t even write any code?  Man, maybe I should stick to Visual Studio.  My co-workers would love this!

 image

I found a forum entry that sent me in the right direction.  It seems that after renaming a few times the designer gets confused and does not rename all of the components as it should. 

Here is my XAML:

image

and my code behind:

image

Notice that the x:Class entry and the code behind don’t match.  To resolve this all that I did was modify the x:Class entry to EndOfYearScreens.End_of_Year_Splash and it worked.  Let’s hope that this never happens to a Designer as they may have to get into the code behind.  AHH!  Hopefully, I can get this prototype out soon without anymore issues like this.

Technorati Tags: Express,Blend,SketchFlow