开发者

Bug Silverlight Intelliscence in VS 2010 does not recognize new controls on page

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


Its not bug, its feature. Custom controls must be compiled before you can use it.


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 the InitialiseComponent 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜