Saturday, March 24, 2012

Namespace Question

The AtlasControlToolkit has a root namespace of AtlasControlToolkit, and the class files also have a namespace AtlasControlToolkit specified. To register the control, the namespace AtlasControlToolkit is used.

I am writing a new extender and am wrapping into a toolkit framework so that the next time I decide to add a control, my "toolkit" is already setup. I have specified a root namespace of My and my class files contain a namespace dictating My as well. In order to register my toolkit, I am forced to use "My.My". Where does the AtlasControlToolkit lose this extra level? Having My.MyAutoComplete is much nicer than My.My.MyAutoCompleteConfused

I'm not sure I fully understand your question. What do you mean by "register my toolkit" exactly?

Are you using VB? VB specifies a default root namespace, whereas C# does not. So if you apply a namespace, yes, you'll get the doubling up. So in your case, change the Default Namespace in the project properties to "My" and then don't add a namespace to your class files.


Yes, I am using VB. For not understanding my question, you did a darn good job of answering it! Smile Now if only you could solve my other problems haha.
Better lucky than good...:)

No comments:

Post a Comment