开发者

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

开发者 https://www.devze.com 2023-04-12 23:49 出处:网络
Hi I am having trouble using a WPF UserControl inside another UserControl. I insert it in a Grid control like this:

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

<loca开发者_JAVA百科l: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!


A wild guess that speaks of the same error:

Namespace issues

0

精彩评论

暂无评论...
验证码 换一张
取 消