Is it somehow possible to avoid xmlns:Engine="clr-namespace..." if i need the same namespace in each of my application windows?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m agree with HCL, I think it can’t be done and adding the namespace will not consume more resources.
I will give you an alternative. You can change the the window template (or create one of your own) to make it include the namespace for you.
In my computer, for VS2010, the path of the template is:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\VisualBasic\WPF\3082
Note that one is for vb.Net, there is a CSHARP directory as well.
Edit:
As far as I Know, the templates are for each computer, not for each project, but when you edit the template you can use conditionals, for example:
You can use the $rootnamespace$ constant to check for a specific project and then add the namespace or not. Maybe a constant with the current project name exists, i don’t know, but $rootnamespace$ should be enought for this pourpose.