Navigating through XAML elements using Live Visual Tree
Live Visual Tree is a debugger tool that helps you to perform XAML debugging more easily. Using this, you can inspect the XAML at runtime and visualize the layout to show alignments and space for UI elements.
Basically, Live Visual Tree provides you a tree view of the UI elements of your running XAML application, and provides information about the number of XAML elements inside each container. If the interface changes from one state to another, Live Visual Tree also changes in runtime.
In this recipe, we will learn more about Live Visual Tree and how to use it to visualize the actual control rendering on the UI.
Getting ready
To get started, open Visual Studio 2017 IDE and create a new WPF project named CH10.XamlDebuggingDemo
.
How to do it...
Follow the steps mentioned here to create our sample demo application and then learn how to use Live Visual Tree to navigate through the XAML elements while debugging the application:
- Let's first design...