Validate data binding in XAML in compile time

后端 未结 6 1730
说谎
说谎 2020-12-08 22:44

I’m working on WPF based application. Environment is VS2008 SP1 with .NET 3.5 SP 1. In our development we are using MVVM pattern widely.

I.e. application developer

6条回答
  •  情歌与酒
    2020-12-08 23:42

    It's been years since the original question was asked and answered but as I just checked, the solution might have gotten simpler since then. ReSharper seems to offer correct Intellisense without the need to generate the static classes mentioned in the accepted answer.

    But I haven't witnessed the compile-time error as stated in the accepted answer. I even tried using [XamlCompilation(XamlCompilationOptions.Compile)] to no avail. Please stand me corrected if I am missing something.

提交回复
热议问题