VS 2010 中的 Bug Silverlight Intelliscence 无法识别页面上的新控件
VS 2010 中的 Silverlight Intelliscence 无法识别页面上的新控件。
需要为智能感知构建解决方案以识别新放置的控件(额外的文本框标签)
这是一个 BUG 吗?
编辑:控件不是自定义的,它们是简单的标签、文本框和按钮控件。
编辑:
按钮从工具箱拖到设计器,
切换到 home.xml.cs
类型button1
错误,智能无法识别添加的button1。
每次都必须构建。
这个问题的解决办法是什么
Silverlight Intelliscence in VS 2010 does not recognize new controls on page.
Solution needs built for the intelliscense to recognized the newly placed control (textbox label extra)
Is this a BUG?
Edit: controls are not custom, they are siple label and textbox and button controls.
Edit:
button from toolbox dragged to designer,
switched to home.xml.cs
types button1
error, intelliscence doesnot recognize the button1 added.
must build each time.
what is the solution to this problem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这不是错误,而是功能。自定义控件必须先编译才能使用。
Its not bug, its feature. Custom controls must be compiled before you can use it.
intellsense 显示编辑时源代码可用的内容。源代码无法真正访问 Xaml。您在智能感知中从 Xaml 中看到的内容实际上位于
YourUserControl.gics
文件中,该文件是从 Xaml 自动生成的。您可以通过从InitialiseComponent
方法的上下文菜单中选择“转到定义”来查看此文件。Xaml 的编辑和该文件的重新生成之间通常存在延迟,有时它永远不会更新。但是,保存 Xaml 始终会重新生成文件。我已经习惯于在编辑代码隐藏之前始终保存 Xaml 文件,以确保 intelisense 是最新的。
The intellsense shows what is available to source code at the time of editing. Source code has no real access to the Xaml. What you see from the Xaml in intellisense is actually in
YourUserControl.g.i.cs
file, which is an auto generated from the Xaml. You can see this file by selecting "Go To Definition" from the context menu of theInitialiseComponent
method.There is often a delay between the edit of the Xaml and the re-generation of this file, at times it never updates. However saving the Xaml always regenerates the file. I've become accustomed to always save the Xaml file before editing code-behind to ensure the intelisense is up to date.