In this post I am going to talk about a cool tool in Visual Studio – Live Visual Tree. This tool is available for Store and WPF applications including Store applications for Windows 8.x.
![]() -->
Don't forget to install LiveXAML NuGet packages. Visual Studio for Windows extension can do it automatically. Mac version doesn't have this functionality yet, so you will have to install them manually. 2020-2-25 Visual Studio 2019 for Mac version 8.4.6 (8.4.6.36) released February 19, 2020. This service release addresses a number of additional accessibility issues and also fixes the following issues: Can't expand a list item in the Review Solution and Commit page after doing a Update Solution command. Visual Studio 2019 for Mac version 8.4.5 (8.4.5.19).
Live Visual Tree allows to observe XAML visual tree in runtime, review properties of elements there and even change properties in runtime in order to check how changes will affect interface without restarting application itself. There are lots of scenarios when you need to use a tool like this and I have already adopted this tool for the following tasks:
In order to open the Live Visual Tree window for your application you need to run your application in the Debug Mode and you can find the Live Visual Tree using Debug->Windows menu item. The second window, which is associated with the Live Visual Tree, is Live Property Explorer. Using the Live Visual Tree you can navigate between XAML elements and using Live Property Explorer you can check, change and create properties there.
You can see that Live Visual Tree provides information about number of XAML elements inside each container. Pay special attention that you can see elements from XAML visual tree only. So, Live Visual Tree contains visible elements only, and if interface changes from one state to another you can see that Live Visual Tree is changing in runtime.
Live Property Explorer shows default values for properties, values which were inherited from other controls and local values of control properties itself. Of course, you can modify local values only. If a value has been assigned to a property previously you can modify it but you can add any other available properties and assign values to them as well.
![]()
In Live Visual Tree window you can find two useful buttons. The first one allows to select any element in the running application in order to find it in the XAML tree. It’s very useful when you want to locate a place of a button and other controls that have tap event handler. The second one allows to visualize layout. Once you select any element you will be able to see layout there.
![]()
As I mentioned earlier you can attach Visual Studio to any existing “XAML window”. For example, you can run the settings window and select Attach to Process in Debug menu of Visual Studio 2015. In the Attach to Process dialog select SystemSettings process and you will be able to see the structure of the window. You even can change current settings and check layout of the window.
So, Live Visual Tree is a very powerful tool which can help to make your application better.
-->
Warning
The Xamarin Live Player Preview has ended. The app is no longer available. The instructions below are provided for customers continuing to use the preview with Visual Studio 2017.
Tip
You can use the XAML Previewer in Visual Studio 2019 orVisual Studio for Mac to view your screen designs as you edit them.
Using Xamarin Live Player
You must already have the Xamarin Live Player app on your device. It is no longer available to download.
Using Xamarin Live Player
You must already have the Xamarin Live Player app on your device. It is no longer available to download.
If you experience any issues or can not connect, see limitations and troubleshooting.
Related Links![]() Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |