Changes
/* Highly Recommended */ Added sections on Delay/LazyLoad and TemplateConverter
== Highly Recommended ==
=== Performance improvements for UBIKContentView or ContentControl ===
UBIKContentView has been updated with performance improving measures, namely the possibility for [[Mobile_XAML#Delay_and_LazyLoading|LazyLoading or Delaying content rendering]].
{{Attention|These performance improvements only work when used with the TemplateConverter syntax documented in the next section!}}
* A default delay of 50 milliseconds was added to all content rendered via UBIKContentView or ContentControl which was conversely found to increase client reactivity. This can be adjusted using the Delay attribute on any such control.
* It is recommended to add LazyLoading="True" UBIKContentView or ContentControl that are not immediately displayed in the UI (a similar concept to our [[Object_hierarchy_in_XAML:_NextLevel,_ParentLevel,_LinkedLevel#Recommended_Usage|LoadNextLevel]] recommendation).
** When used in the content of a UBIKTabView tab, the LazyLoading is handled automatically when the tab is activated (see: UBIKContentArea).
** LazyLoading can be manually triggered on any contentview outside of UBIKTabView by triggering the TriggerLazyLoad() method.
=== TemplateConverter for UBIKContentView or ContentControl ===
The recommended syntax for embedding templates within other templates has changed due to performance improvements from Delay or LazyLoading the rendering of content. Note that this refers only to directly mentioned templates, rather than when using TemplateSelectors. A good example can be seen in the tab contents of UBIKContentArea for Properties and Documents.
<syntaxhighlight lang="xml">
<controls:UBIKContentView
Converter="{StaticResource TemplateConverter}" ✅
ConverterParameter="UBIKPropertyArea"
LazyLoading="True" />
</syntaxhighlight>
Note how the above example uses the new TemplateConverter together with the name of the desired template, in this case UBIKPropertyArea.
The former syntax would have been: <syntaxhighlight lang="xml">❌ Content="{Binding [UBIKChildArea], Source={x:Static services:TemplateService.Instance}}"</syntaxhighlight>.
This 'hardcoded' syntax bypasses the template selection mechanism which includes the various performance improvements mentioned above.
=== New name for Root item templates ===
The template formerly called UBIKMainItem has been renamed to UBIKRootItem for consistency.
|}
[[Category:How-To|Convert Xamarin XAMLs to Maui]][[Category:Mobile|Convert Xamarin XAMLs to Maui]][[Category:XAML|Convert Xamarin XAMLs to Maui]]
== Recommended ==
