==== Set Current DateTime ====
The current DateTime stamp can be retrieved from '''AppStatus.LiveDateTime'''.<br>
Since the known issue described in the section above prevents direct binding to this, below are examples for how to implement it.
<tabs>
<tab name="UWP">
</Button>
</source>
{{Hint|The DateTime can be set to the desired format by adding a StringFormatConverter to the LiveDateTime binding:<br><nowiki>"{Binding Tag.AppStatus.LiveDateTime, ElementName=SetCurrentDateTimeButton, </nowiki>'''<nowiki>Converter={StaticResource StringFormatConverter}, ConverterParameter={0:yyyy-MM-dd HH:mm}</nowiki>'''<nowiki>}" </nowiki>.}}
</tab>
<tab name="Xamarin">
</tabs>
[[Category:Client|XAML Tips]]<br> [[Category:WinX|XAML Tips]][[Category:XAML|XAML Tips]][[Category:Xamarin|XAML Tips]]
=== SaveAndCommitCommand ===
<br>
<br>
==== Localizing UI Texts ====
The most efficient practice is to use pre-localized texts from the standard client, however, this is not always possible, especially in custom UIs. The ObjectByUID indexer was therefore initially developed as a technique to allow localization of custom UI label texts.
The concept is to create an infrastructure object that carries metaproperties for localized texts, then bind to this infrastructure object using ObjectByUID, and bind to a specific metaproperty to receive it's localized Description text as follows:
<source lang = "xml">
"{Binding ObjectByUID[paste-your-uid].Properties.VisibleItems[add-your-property-name].Description}"
</source>
From here there are two approaches; the database-leaning one is to add one metaproperty per UI label, and simply bind to the Description of it. However, this shifts maintenance effort to the UBIK Studio after the initial adding of the label in XAML. Another approach would be to use the metaproperty to provide a "tag" that the xaml customizer can then use to differentiate between hardcoded labels.
A third approach would be to create one infrastructure object per label, however, this can lead to many objects being loaded upon startup.
{| class="wikitable"
|-
! Approach !! Implementation !! Maintenance Effort !! Recommendation
|-
| One metaproperty per UI Label || Bind the label text to the metaproperty Description || Database / UBIK Studio || Recommended for UWP, customizings with fewer UI texts, finalized customizings.
|-
| One metaproperty delivering a localization "tag" (such as: "EN" / "DE") || Use something like DataTrigger (Xamarin) to hardcode a different localized text per tag (such as: "eg." / "zb.") || XAML || Recommended for Xamarin, highly customized UIs with many texts, customizings that tend to change often.
|}
<br>
<br>
[[Category:Client|XAML Tips]]
[[Category:WinX|XAML Tips]]
[[Category:XAML|XAML Tips]]
[[Category:Xamarin|XAML Tips]]
== Showing Images and Icons ==
<br>
[[Category== Default Tab Selection ==The tab selection in UBIKContentView defaults to the first tab, which is Children objects. However, for cases where it makes more sense to display Properties or Documents by default, it is possible to change the tab selection using the following classifications:Client|XAML Tips]]* [[Category:WinX|XAML TipsSYSCLS_SHOWDOCUMENTS]]* [[Category:XAML|XAML TipsSYSCLS_SHOWPROPERTIES]][[Category:Xamarin{{Attention|XAML Tips]]Adding the classification to a metaclass is enough for UWP. However, Xamarin currently requires additional customizing to make use of the TabSelector property.}} ==== Implementation in Xamarin ====One approach is to add a DataTrigger to the SfTabView found in UBIKContentArea that is triggered by the value of the TabSelector property, as shown below;<source lang = "xml"><tabView:SfTabView VisibleHeaderCount="3" > <!-- tabView:SfTabItems ... --> <tabView:SfTabView.Triggers> <DataTrigger TargetType="tabView:SfTabView" Binding="{Binding TabSelector}" Value="PropertiesTab"> <Setter Property="SelectedIndex" Value="1"/> </DataTrigger> <DataTrigger TargetType="tabView:SfTabView" Binding="{Binding TabSelector}" Value="DocumentsTab"> <Setter Property="SelectedIndex" Value="2"/> </DataTrigger> </tabView:SfTabView.Triggers></tabView:SfTabView></source><br><br>
== FlipView ==