New Posts New Posts RSS Feed: cocktail the name 'InitializeComponent' does not exist in the current context
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

cocktail the name 'InitializeComponent' does not exist in the current context

 Post Reply Post Reply
Author
decoda View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Jan-2013
Posts: 6
Post Options Post Options   Quote decoda Quote  Post ReplyReply Direct Link To This Post Topic: cocktail the name 'InitializeComponent' does not exist in the current context
    Posted: 14-Jan-2013 at 4:22am
Hi

I Started a 4.5 wpf solution and used nuget to add cocktail to test out happyhour part2 tutorial, my problem is the app compiles and runs but no window shows up.

 i added to the App.xaml.cs

public App()
{
            InitializeComponent();
 }

and got this error (the name 'InitializeComponent' does not exist in the current context)

all the namespaces are the same, tried several things but am stuck the appbootsrap is not getting called.

thank you
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post Posted: 14-Jan-2013 at 8:33am
I'm a bit confused. HappyHour is a Silverlight tutorial not WPF. However, App.xaml.cs should look like this.
    public partial class App
    {
        public App()
        {
            InitializeComponent();
        }
    }
 
Also, for WPF, the bootstrapper needs to be defined inside a ResourceDictionary as documented here:
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down