none
WPF designer - The tag 'xxxx' does not exist in XML namespace 'clr-namespace:YYYY' RRS feed

  • Question

  • I'm having a problem with using a user control in a window. I've added the appropriate namespace declaration to the window tag:

    xmlns:local="clr-namespace:YYYY

    and intellisense sees the appropriate control when I type "<local:" I can see all the classes in that namespace. When I build the project, I get no errors, when I run the application, it runs just as I'd expect with no run-time errors, but the designer complains that there is a problem and I can no longer see the designer to change the window unless I first comment out the offending tag.
    Does anybody know why this is happening? Why doesn't the designer see the control when the compiler obviously does?


    Friday, September 19, 2008 1:49 PM

Answers

  • Thanks for the response. I have seen similar intermittent problems like this before, but this one doesn't want to go away. However, I believe it's actually because I'm using the control inside a template a column in the DataGrid CTP. It seems if I take the control out of there and just drop it anywhere else on the window, the designer has no problems with it.
    I guess the designer support for the DataGrid is still a little wobbly.
    • Marked as answer by wjousts Monday, September 22, 2008 12:48 PM
    Friday, September 19, 2008 7:20 PM

All replies

  • That happens sometimes on IDE. Not always all the references are gathered by the designer. Happens a lot when you start using ResourceDictionary.MergedDictionaries.

    Maybe reopennig the solution will force IDE do gather the UserControl and all its Resources references.

    We'll get to perfect runtime design, one of these days.
    Bigsby, Lisboa, Portugal
    Friday, September 19, 2008 3:01 PM
  • Thanks for the response. I have seen similar intermittent problems like this before, but this one doesn't want to go away. However, I believe it's actually because I'm using the control inside a template a column in the DataGrid CTP. It seems if I take the control out of there and just drop it anywhere else on the window, the designer has no problems with it.
    I guess the designer support for the DataGrid is still a little wobbly.
    • Marked as answer by wjousts Monday, September 22, 2008 12:48 PM
    Friday, September 19, 2008 7:20 PM
  • That and the fact the purppose of the IDE is the development. If you don't want to have to wait for the designer to display something instead of letting you work.
    Bigsby, Lisboa, Portugal
    Saturday, September 20, 2008 10:04 AM