我一般来说对WPF和.Net编程还是有点陌生。 我已经下载了此源代码。
I'm kinda new to WPF and .Net programming in general. I have downloaded this Source Code.
现在,它有一个包含Paris.Controls csproj的解决方案。
Now, it has a solution which contains a Paris.Controls csproj.
这是最初为Silverlight制作的,当我尝试添加时引用这些控件的输出dll,我得到一个错误:
This was originaly made for Silverlight, when i try to add referance to the outputed dll of those controls, i get an error:
Error 1 Unknown build error, 'Cannot resolve dependency to assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Line 9 Position 80.' C:\Users\Eric\Documents\Visual Studio 2010\Projects\WpfApplication1\WpfApplication1\MainWindow.xaml 9 80 WpfApplication1经过一番谷歌搜索后,由于Silverlight-WPF转换,我发现这是最喜欢的方式。 Silverlight使用的引用不同于WPF。 我认为这有点愚蠢,因为据我了解,Silverlight是WPF的减法,但没关系。
After a bit of googling, i found out It's most likley because of the Silverlight - WPF transformation. That Silverlight uses different referances then WPF. Which is kinda dumb i think because as i understood Silverlight is a substraction of WPF, but nevermind.
所以我的问题是我应该怎么做,怎么办? 我应该编辑Paris.Controls并将其设置为WPF可用吗? 更改推荐人之类的东西?如果那是我应该做的,我该怎么做? 如果没有,我有什么选择?
So my question is what should i do and how? Should i edit the Paris.Controls and make it WPF-Available? Change referances and stuff like that? and if that's what i should do, How do i do that? And if not, what are my options?
请帮助大家,真诚的帮助您, Eric
Please help guys, Sincerly yours, Eric
推荐答案您不能。
Silverlight和WPF虽然非常相似,但它们基于.NET运行时的不同版本。 WPF使用完整版本,而Silverlight使用针对Internet优化的轻量级版本。
Silverlight and WPF, while very similar are based on different versions of the .NET runtime. WPF uses the full version, while Silverlight uses a lighterweight version optimised for the Internet.
有了源代码,您应该可以将其合并到WPF控件中-这将意味着针对完整的库进行重新编译,并修复编译器抛出的所有错误。
As you have the source code you should be able to incorporate that into a WPF control - it will mean recompiling against the full libraries and fixing any errors that the compiler throws up.
更多推荐
如何将Silverlight控件添加到WPF解决方案?
发布评论