=== Performance analysis (MAUI Mobile only) {{Version/MobileSince|5.0}} ===In the MAUI Mobile app, {{UBIK}} provides customizers a possibility to analyze the performance of specific UI elements by measuring the time it takes to render them. This can help customizers find performance weak spots in the entire UI and also serve as a benchmarking tool to verify the result of any improvement attempts.
The measurement is achieved through the use of the MeasurePerformanceBehavior. The concept of it is very similar to other behaviors, namely you attach it to any UI element in the XAML code (as long as it's a derivate of the [https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.visualelement?view=net-maui-9.0 VisualElement], which should cover the vast majority of all UI element types).
* The behavior measures the time to render the UI element (which it attaches to) as well as its child elements (recursively if any).
<tabs>
<tab name="Mobile(Maui)">
<br/>
Namespace referenced in the code: <code>xmlns:behaviors="clr-namespace:UBIK.MAUI.Behaviors;assembly=UBIK.MAUI"</code>
<pre>2025.07.15 12:12:18:1030 Debug Sender: MeasurePerformanceBehavior Message:'Rendering Microsoft.Maui.Controls.Grid UBIKChildItemRootGrid took 8.4889 ms'</pre>
[[Category:Mobile|XAML Best practices]][[Category:Pages with broken file links|XAML Best practices]][[Category:XAML|XAML Best practices]]
== Templating ==