WPF XAML 命名空间导入
我发现为了在 XAML 中使用 PRISM 的类,您需要以这种方式导入命名空间: xmlns:cal="http://www.codeplex.com/CompositeWPF" 这种方式对我来说是新的,所以我想知道,超链接如何可以是命名空间导入的常用表示法的别名?那么智能知道应该在哪个程序集中搜索这个组件? 谢谢!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您在 AssemblyInfo.cs 文件中查找感兴趣的程序集,通常会发现有一个程序集属性将 URI 映射到 CLR 命名空间。下面是一个示例:
您也可以将多个映射组合到同一 URI:
这些映射甚至可以跨程序集...您可以使用相同的 URI 来映射来自多个程序集的名称空间。
自己使用这个也很有帮助!非常方便。
If you look in the AssemblyInfo.cs file for an assembly you are interested in, there is typically an assembly attribute that maps a URI to a CLR namespace. Here's an example:
You can combine multiple mappings to the same URI as well:
These can even cross assemblies... you can use the same URI to map namespaces from multiple assemblies.
It's helpful to use this yourself as well! It's pretty convenient.