TripleAntigen
TripleAntigen

Reputation: 2301

WPF XAML x:Name="[Anything]" causes compilation to fail with "Type 'MyType' is not defined"

Hi I am having trouble using a WPF UserControl inside another UserControl. I insert it in a Grid control like this:

<local:MultiUseDialog />

and it works and compiles fine but as soon as I add a name (any name) like this:

<local:MultiUseDialog x:Name="AnyNameWhatsoever" />

I get multiple compilation errors saying Error 7 - Type 'MyProject.MultiUseDialog' is not defined.

What am I doing wrong? I am pulling my hair out here, any advice would be appreciated!

Upvotes: 2

Views: 1607

Answers (1)

Emond
Emond

Reputation: 50672

A wild guess that speaks of the same error:

Namespace issues

Upvotes: 3

Related Questions