Changes

UBIK Templates

22 bytes added, 09:47
* If an object defines a child area template name (see [[SYSCLS_CHILDAREATEMPLATE|child area template classification]]), return the custom template with that name;
<div id="StrictTemplatePolicy"></div>
* {{Version/WinXSince|3.6}} ('''Not yet available for XamarinMobile''') If not found and the "Strict Template Loading Policy" setting is turned on, returns an [[Developer_Mode#Errors|error template]]; (This can be useful for checking if some templates are missing before the final deployment.)
* If not found, returns the default UBIKChildArea template.
In general, Template Selectors return DataTemplates based on the given object. {{UBIK}} provides template selectors for different Items & Areas and their logic is explained in the following subsections.
=== ChildItemTemplateSelector (UWP & XamarinMobile) ===
This returns a fitting template based on the given child item according to the following rules:
* If the child item is classified with the [[SYSCLS_CHILDITEMTEMPLATE|child item template classification]] and carries a valid child item template name:
=== PropertyDirectItemTemplateSelector (UWP & XamarinMobile) ===
This returns a fitting template based on the given property item according to the following rules:
<tabs>
** Returns a ''UBIKPropertyDirectItemNotSupported'' template if the given Property is none of the type above.
</tab>
<tab name="XamarinMobile">
* Returns a non-direct edit template (namely ''UBIKPropertyItem''):
** when the given PropertyViewModel is a [[Live_Values|live value]] item or
=== TaskPropertyTemplateSelector (UWP & XamarinMobile) ===
This returns a fitting template based on the given task property item according to the following rules:
<tabs>
** Returns a ''UBIKTaskProperty'' template if the given TaskViewModels (namely the associated object is a [[MRO_Objects_(Client)#Task|Task]]) Value has none of the types above.
</tab>
<tab name="XamarinMobile">
* Returns a non-direct edit template (''UBIKTaskProperty''):
** when the PropertyViewModel of the given TaskViewModel (namely if the associated object is a [[MRO_Objects_(Client)#Task|Task]]) is a [[Live_Values|live value]] item or
=== HotSpotTemplateSelector (UWP & XamarinMobile) ===
This returns a fitting template based on the given [[HotSpotting#HotSpots|HotSpot]] item according to the following rules:
* Returns a ''UBIKAngularLinkHotSpot'' template if the given [[HotSpotting#HotSpots|HotSpot]] is of type LinkHotSpot with HotSpotShape Angular & if the UBIKAngularLinkHotSpot template is not null.
=== ChildAreaTemplateSelector (UWP) / ChildAreaTemplateConverter (XamarinMobile) ===
This returns a fitting template for a given context object according to the following rules:
<tabs>
** Tries to return a custom template with the name ''UBIKChildArea'' + Suffix.
</tab>
<tab name="XamarinMobile">
* If the context object is classified with the [[SYSCLS_CHILDAREATEMPLATE|ChildAreaTemplate Classification]] and carries a valid child area template name:
** Tries to return a custom template with the name of CustomTemplateName.
=== ContentAreaTemplateSelector (UWP) / ContentAreaTemplateConverter (XamarinMobile) ===
This returns a fitting template for a given context object according to the following rules:
<tabs>
** Tries to return a custom template with the name of ''UBIKContentArea'' + Suffix.
</tab>
<tab name="XamarinMobile">
* If the context object is classified with the [[SYSCLS_CONTENTAREATEMPLATE|ContentAreaTemplate Classification]] and carries a valid content area template name:
** Tries to return a custom template with the name of CustomTemplateName.
=== PropertyEditorItemTemplateSelector (UWP) / EditTemplateConverter (XamarinMobile) ===
This returns a fitting template for a given context property according to the following rules:
<tabs>
</tab>
<tab name="XamarinMobile">
* Returns a ''UBIKEditMinMax'' template if the given Property is a [[Min_Max_Properties|Min Max Property]].
* Returns a ''UBIKEditBool'' template if the given Property is of type Bool.
[[Category:WinX|UBIK Templates]]
[[Category:XAML|UBIK Templates]]
[[Category:Mobile|UBIK Templates]]
561
edits