IntelliSense for Data Binding not working

☆樱花仙子☆ 提交于 2019-12-03 05:36:58
Kcvin

I opened your GitHub project in Visual Studio 2013 and I got the same behavior; no IntelliSense for bindings.

The design data is the key to the binding resolution which is failing, so I recommend this:

  1. Add your project namespace to your Window element: xmlns:local="clr-namespace:IntelliSenseForDataBinding" which can help resolve the location of VM.
  2. Change your d:DataContext to use thelocal namespace instead of d:Type, essentially providing the location of the type you're trying to use: d:DataContext="{d:DesignInstance local:MainViewModel, IsDesignTimeCreatable=True}"
  3. Clean, Build, and Test

Proof:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!