创建的xmlns参考其他项目,我有这样定义的WPF项目:不能在XAML
MyApp.sln MyAppWPF MyApp.Domain
在在MyAppWPF项目我的XAML文件一个我想引用定义的类MyApp.Domain项目。我有一个项目参考在MyAppWPF到MyApp.Domain。我想创建这样的引用:
<Window x:Class="MyAppWPF.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:MyApp.Domain;assembly=MyApp.Domain" Title="Window1" Height="305" Width="485"> <Window.Resources> <local:MyClass x:Key="mine" /> </Window.Resources> </Window>
我得到一个错误,该组件无法找到,但我可以创造我想在后面的代码来引用类的一个实例,所以我知道我已经正确引用了它。
我该怎么做?我需要一个强名,还是直接引用dll而不是使用项目引用?
嗨特德 - 你有没有解决这个问题? – 2009-06-13 09:12:21