Changes

UBIK Templates

223 bytes added, 25 April
* 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}} 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.
{{Hint|It's possible to use a different syntax to refer to a custom named template, e.g. <br><nowiki><ContentControl ContentTemplate="{Binding TemplateService[UBIKChildArea_WorkPackage]}" /> </nowiki>.<br> However, since the client does not know which default template should be used, an [[Developer_Mode#Errors|error template ]] will be used if the custom named one can not be found.}}
{{Hint|It's also possible to specify a Suffix for the template selector, e.g.<br><nowiki><tpl:ChildAreaTemplateSelector x:Key="ChildAreaTemplateSelector" Suffix="Small" /></nowiki>.<br>Unlike the custom name template name lookup, the Suffix is no longer considered optional once specified. If such a template file cannot be found, an [[Developer_Mode#Errors|error template ]] will be used.}}
== Template Selectors ==
{{UnderConstructionStart}}
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 & Xamarin) ===
** If the given MROViewModel contains ProjectData (namely if the associated object is a [[MRO_Objects_(Client)#MRO_objects_with_project_information_.28WinX_only.29|MRO object with project information]]) and the ProjectItemTemplate is not null, it returns that ProjectItemTemplate.
** Otherwise, if the given MROViewModel contains ProjectData (namely if the associated object is a [[MRO_Objects_(Client)#MRO_objects_with_project_information_.28WinX_only.29|MRO object with project information]]) and the ProjectItemTemplate is null, it returns a ''UBIKProjectItem'' template.
** If nothing of the above fits& the RootItemTemplate is not null, it returns that RootItemTemplate.** If nothing of the above fits & the RootItemTemplate is null, it returns a ''UBIKMainItem'' template.
{{Hint|To get an overview of how template selectors work, please refer to [[UBIK_Templates#Template_loading_mechanism|Template loading mechanism]].}}
* Returns a ''UBIKEditSignature'' template if the given Property is of type Signature.
* Returns a ''UBIKEditChart'' template if the given Property is of type Chart.
{{Hint|Even though {{UBIK }} has an editor for GeoData and FileReference typetypes, its UI is not customizable and therefore the selector is not relevant for them.}}{{Hint|{{UBIK }} doesn't show editors for XML, ByteStream, Geography, and Undefined typetypes, therefore the selector is not relevant for them.}}
</tab>
257
edits