Changes

XAML Tips

113 bytes added, 11:21, 23 November 2023
== Functionality related ==
 
=== Attachable behaviors ===
It's quite often that you need to attach behaviors to certain XAML elements. For example, on a Grid, you want to attach a behavior which executes a command upon a Tapped event, or you want to execute a command when a certain property on a UBIK object changes.
</tabs>
[[Category:Client|XAML Tips]]
[[Category:WinX|XAML Tips]]
[[Category:XAML|XAML Tips]]
[[Category:Xamarin|XAML Tips]]
== Performance related ==  
=== FlipView ===
 
==== UI virtualization ====
When using the FlipView control in your XAML code, it's better to enable [https://docs.microsoft.com/en-us/windows/uwp/debug-test-perf/optimize-gridview-and-listview#ui-virtualization UI virtualization]. The difference in performance gets more obvious as the number of items in the FlipView increases. Here's how to enable it.
</FlipView>
</source>
 
==== Auto saving ====
Unsaved changes on the document (e.g. Annotations) are gonna be saved and committed automatically when flipping the page in the FlipView.
 
{{Attention|Changes are lost when leaving the page without flipping the document first.}}
 
337
edits