How to inspect the Visual Tree of any UWP app

天涯浪子 提交于 2020-05-27 11:34:09

问题


Is it possible to inspect the Visual Tree of any UWP application to see how it is rendered, in the same way that you can inspect the visual tree of the app that you're debugging in Visual Studio?

It would be very beneficial to be able to see how the user interface of some applications are comprised.


回答1:


Yes.

  • Open Visual Studio with no project open.
  • Choose "Debug" from the top menu, and "Attach To Process".
  • Press the "Select" button next to the "Attach To" entry field, and choose "Native Code" only.
  • Choose your target UWP app and press ok.

At this point your should have an inspectable Live Visual Tree.

Without being able to see the code that helped construct that XAML it might not be as useful as you hope, but it's still occasionally interesting to spark some ideas.



来源:https://stackoverflow.com/questions/54999718/how-to-inspect-the-visual-tree-of-any-uwp-app

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