XAML Error: The name ‘InitializeComponent’ does not exist in the current context
XAML designer is full of surprise so get ready for Binging … When you get below error then just remove Default constructor with InitializeComponent() call and everything will be fine.
When I had UserControl on my main Windows Phone Project I was not getting error. But suddenly I copied it to Class Library Project and didn’t like my InitializeComponent() in default constructor created when user control was added.
Here is the error.
The name ‘InitializeComponent’ does not exist in the current context
To fix it remove below code from your file.
public MyUserControl() { InitializeComponent(); }
Leave a Reply
You must be logged in to post a comment.