none
Xaml Mapping to a referenced Assembly?

    Question

  • How can I map a Namespace of a referenced assembly in Xaml.

    Local Assembly:

    <?Mapping XmlNamespace="local" ClrNamespace="AvalonApplication1" ?>

    <local:Class1  />

    ??? External Assembly:
    <?Mapping XmlNamespace="local" ClrNamespace="External" ?>

    <local:Class1  />

    Error: Window1.xaml(9,10): error MC3074: Unknown tag 'DataSource' in namespace 'local'. Note that tag names are case sensitive. Line 9 Position 10.

    This Assembly is not in GAC.
    Tuesday, November 08, 2005 1:53 PM

Answers

  • Did you set the refenrence in your root element?

    <?Mapping XmlNamespace="local" ClrNamespace="External" Assembly="YourAssembly" ?>

    <Canvas
      xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
      xmlns:x=http://schemas.microsoft.com/winfx/xaml/2005
      xmlns:local="local">  

    <
    local:Class1  />

    Tuesday, November 08, 2005 2:58 PM
    Moderator

All replies

  • Did you set the refenrence in your root element?

    <?Mapping XmlNamespace="local" ClrNamespace="External" Assembly="YourAssembly" ?>

    <Canvas
      xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
      xmlns:x=http://schemas.microsoft.com/winfx/xaml/2005
      xmlns:local="local">  

    <
    local:Class1  />

    Tuesday, November 08, 2005 2:58 PM
    Moderator
  •  Konstantin Gonikman wrote:
    Did you set the refenrence in your root element?

    <?Mapping XmlNamespace="local" ClrNamespace="External" Assembly="YourAssembly" ?>

    <Canvas
      xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
      xmlns:x=http://schemas.microsoft.com/winfx/xaml/2005
      xmlns:local="local">  

    <
    local:Class1  />



    Well I think you answered the question. I think his initial problem is that he was missing the Assembly attribute on the Mapping instruction, but yes you'll need the XML namespace declaration as well.

    Cheers,
    Drew
    Tuesday, November 08, 2005 3:15 PM
    Moderator
  • Thank you, indeed I missed the Assembly attribute.
    Wednesday, November 09, 2005 8:39 AM