I am quite new on C#, WPF and XAML, so I may not be able to use the right terms to ask the right question =)
I am trying to add my own namespace to my xaml file in order to use my own class easily -I guess the reason is this-
I wrote the following code in window tag for this:
xmlns:myns="clr-namespace:LibNameSpace"
Where my window tag also starts with the following definition:
< Window x:Class="LibNameSpace.MainWindow"
I want to use the LibNameSpace:Class1
class, and I was hoping to write myns:Class1
for this. However, that command causes this error:
Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'LibNameSpace' that is not included in the assembly.
How can I fix this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…