The type 'Window' does not support direct content

前端 未结 5 725
既然无缘
既然无缘 2021-02-05 00:09

I have a WPF solution built with VS 2015 composed of several projects. Suddenly I started receiving a warning in design mode stating the following:

The t

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-05 00:42

    At least in a WPF IronPython project, adding the System.Xaml reference to the project solved the problem for me:

    An important thing to note here is that adding seemingly any reference will make the problem go away temporarily -- until Visual Studio is restarted. System.Xaml, on the other hand, appears to keep the problem at bay. I even tried removing the reference, whereafter the problem returned upon restarting Visual Studio.

提交回复
热议问题