如何在WinForms应用程序中的WPF窗口上使用Live Visual Tree?

时间:2018-05-16 20:56:11

标签: wpf visual-studio

我有一个Win Forms项目,其中包含一个ElementHost中的WPF窗口。我想使用Live Visual Tree来调试WPF UI,但是当我运行应用程序时,树完全是空的。

我猜这是因为VS看到我正在运行Windows Forms项目,并且不知道将树挂钩到项目的WPF部分。

有没有办法做到这一点,或者启动项目是否必须是WPF应用程序才能让树工作?

我正在使用Visual Studio 2017

1 个答案:

答案 0 :(得分:4)

VS不支持Win Visual应用程序的Live Visual Tree,即使它嵌入了WPF控件。

https://developercommunity.visualstudio.com/content/problem/100844/xaml-edit-and-continue-not-working-if-wpf-control.html