Undeclared Namespace error when using x:TypeArguments

I'm trying to create a Page based on my own derived Page class, which has generic type arguments:

<p:ViewModelBackedPage x:Class="Paragon.SSRM.UI.ToolsPage" x:TypeArguments="{x:Type p:ViewModel}"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

xmlns:p="clr-namespace:Paragon.SSRM.UI.Primitives"

xmlns:ui="clr-namespace:Paragon.SSRM.UI"

Title="ToolsPage"

Width="735" Height="464"

xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"

>

But I get an error "Error 192 '{x' is an undeclared namespace. Line 1 Position 60". (The position is the 'x' in "x:TypeArguments").

I tried creating a generic Page Function in XAML, and that works fine. I've got a feeling that this is to do with using my own namespaces.

Any ideas anyone



Answer this question

Undeclared Namespace error when using x:TypeArguments

  • badri_neo

    I mean as a possible workaround but if you can't, I don't know how to solve it

  • Brad Ball

    Do you mean to try this as a workaround, or to try it and see what happens

    I couldn't do that as a workaround because I need to define my Pages as Indepenant elements - so they have to be the root elements.

    If I get time, I'll see what happens when I do as you suggest.


  • june_21

    I get this error during Compilation.
  • techexpert

    Try to set the ViewModelBackedPage in a Window root element and not as the root element.



  • andreesje

    Anybody from MS got any thoughts on this
  • Amit_Kulkarni

    Did you get this error during the compilation or just when you type or copy/paste the code

    If it's not during the compilation, you don't have to worry about this error: don't forget that it's a Beta version and that all is not implemeneted correctly yet ;)



  • Undeclared Namespace error when using x:TypeArguments