How to Use AvaloniaUI Developer Tools
Ingvar
Posted on March 1, 2021
Hello, in this post I will briefly explain how to install and use developer tools in your AvaloniaUI project. As always, I will use my app Camelot as working example.
What is developer tools window?
Developer tools window is similar feature to Chrome developer console. It allows you to observe tree of elements, their styles and positions, including margins/paddings etc. Also it has ability to log UI events and even to show FPS!
How to add it
Add following lines of code inside your main window code behind class inside constructor:
#if DEBUG
this.AttachDevTools();
#endif
Usage
Open developer tools window using F12
.
Watch visual tree and edit controls parameters:
Watch events:
Highlight elements in tree:
💖 💪 🙅 🚩
Ingvar
Posted on March 1, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.