wpf - Why would adding an x:Name attribute to a user control cause a compilation error? -


I really need to have some more ideas as to what is needed to create it, at present it's my The wall is driving up.

I have a Xaml user control which includes another user control like this:

  & lt; UserControl x: Class = "MyModule.View.MainView" xmlns = "http://schemas.microsoft.com/enffx/2006/XAML/Presentation" xmlns: x = "http://schemas.microsoft.com/winfx/ 2006 / xaml "xmlns: igDock =" http://infragistics.com/DockManager "xmlns: View =" Clr-namespace: MyModule.View "& gt; & Lt; StackPanel x: name = "panel" & gt; & Lt; Thought: MyHeaderView / & gt; & Lt; IgDock: XamDockManager x: name = "docking manager" /> & Lt; / StackPanel & gt; & Lt; / UserControl & gt;  

This is within a prism module (hence MyModule name), but otherwise I do not think it is something unusual.

Now, as soon as I add a name to the title to see the code, it fails to compile such as

    

Error is just to get back to me:

"type name 'view' 'type is not present in MyModule.MyModule"

I tried to move the contained user control in another namespace, trying to create an empty user control and try with that (the same result) and remove XamDockManager, but nothing Does not matter.

Can someone shed some light on this

I think that Got answers.

If I change the module class to MyModuleThingy, then compile it. It appears that the problem arises because the module name is the namespace name (MyModule.MyModule).

If someone can tell me why this problem may be, I am interested in learning a lot, especially because I have received so many codes, where the same effect of the prism seems to be similar within it happens.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -