Xaml Mapping to a referenced Assembly?
-
Tuesday, November 08, 2005 1:53 PM
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.
All Replies
-
Tuesday, November 08, 2005 2:58 PMModerator
Did you set the refenrence in your root element?
<?Mapping XmlNamespace="local" ClrNamespace="External" Assembly="YourAssembly" ?>
<Canvas
local:Class1 />
xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
xmlns:x=http://schemas.microsoft.com/winfx/xaml/2005
xmlns:local="local">
< -
Tuesday, November 08, 2005 3:15 PMModerator
Konstantin Gonikman wrote: Did you set the refenrence in your root element?
<?Mapping XmlNamespace="local" ClrNamespace="External" Assembly="YourAssembly" ?>
<Canvas
local:Class1 />
xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
xmlns:x=http://schemas.microsoft.com/winfx/xaml/2005
xmlns:local="local">
<
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 -
Wednesday, November 09, 2005 8:39 AMThank you, indeed I missed the Assembly attribute.

