Changes

UBIK Templates

493 bytes removed, 15:11, 15 November 2019
The UI of {{UBIK}} WinX/UWP client is controlled by several predefined XAML templates which are loaded into the App at startuphighly customizable. There is a set of default template deployed with the App at installation, however, each of them Project engineers/customizers can be overridden by placing tailor the respective file in the folder [AppInstallPath]\LocalState\XAML. <br>Here you can see which XAML which area defines, either the area is ''beige'' colored UI for minor style changes or it has a ''red border'' around itmajor redesigns according to their needs.
=== General ==knowledge =* UBIKThemesDue to the nature of customizing, it's impossible to cover all issues or questions that one might have during customizing.xamlControls However, the overall styling and behavior fundamental ones should become self explanatory with the help of the App, like standard Brushes (Colors) and Fonts[[Developer Mode]] feature.Such questions include and are not limited to:* Which parts of the UI are customizable?* How do I get the default XAML templates used in the clients?* What kind of data can I present in the custom UI?* Where should I deploy the custom template files?
==== AuthenticationPage ===UI controls =* UBIKSplashAreaControls are basic building blocks for constructing the UI.xaml[[File:SplashAreaASeveral types of them are used in the client.JPG|upright=0.35|thumb|left|alt=UBIKSplashArea|UBIKSplashArea.xaml]]{{clear}}* UBIKPageNavigation.xaml -> Deprecated and changed to UBIKHomePageButtons.xaml {{Version/WinXSince|3.0.0}}[[File:HomePageButtonsA.JPG|upright=0.35|thumb|left|alt=UBIKHomePageButtons|UBIKHomePageButtons.xaml]]{{clear}}* UBIKProfileItem.xaml[[File:after.png|upright=0.35|thumb|left|alt=UBIKProfileItem|UBIKProfileItem.xaml]] {{clear}}
== Standard controls ==
All standard Universal Windows Platform (UWP) controls can be used for our WinX/UWP client. There are online official documentations available for these controls. Some official or 3rd party apps showcasing these also exist and can be of great help. For example, [https://www.microsoft.com/en-us/p/xaml-controls-gallery/9msvh128x2zt?activetab=pivot:overviewtab XAML controls gallery] presents a rich collection of examples/tutorials.
== 3rd party and UBIK controls ==
We also use a few 3rd party (e.g. Syncfusion) and {{UBIK}} custom made controls in our client. There is currently no compiled lists of such controls. However, as a general rule, any such controls one finds in the default templates can be used in customizings.
=Template loading mechanism == Content Pages ===* UBIKObjectIcon.xaml[[File:ObjectIconA.png|upright=0.35|thumb|left|alt=UBIKObjectIcon|UBIKObjectIcon.xaml]]{{clear}}* UBIKObjectIconSmall.xaml* UBIKBottomLeft.xaml[[File:BottomLeftA.JPG|upright=0.35|thumb|left|alt=UBIKBottomLeft|UBIKBottomLeft.xaml]]{{clear}}
== Templates with default names ==
As one can see in the [[Developer Mode]], the default client UI consists of many parts and each of them is defined in an individual template with names such as UBIKChildArea. When a custom template file with the same name is deployed, that template is used by the client instead of the default one that comes with the client.
==== RootPage ==Templates with custom names ==* UBIKMainLeftAreaA common problem with customizing templates such as UBIKChildArea is that it alters the UI for all types of child objects.xamlIn order to use different templates depending on the objects, solutions such as [[File:MainLeftA.pngSYSCLS_CHILDAREATEMPLATE|upright=0.35|thumb|left|alt=UBIKMainLeftArea|UBIKMainLeftArea.xamlchild area template classification]]{{clear}}* UBIKMainItem.xamland [[File:MainItemA.JPGSYSCLS_CHILDITEMTEMPLATE|upright=0.35|thumb|left|alt=UBIKMainItem|UBIKMainItem.xamlchild item template classification]]{{clear}}* UBIKMainItemSmallare provided.xaml[[File:MainItemSmallACustom template files with names such as UBIKChildArea_WorkPackage can be deployed so that only objects of that type display the custom content while the rest still uses the default UI.JPG|upright=0.35|thumb|left|alt=UBIKMainItemSmall|UBIKMainItemSmall.xaml]]{{clear}}*UBIKMainArea.xaml[[File:MainAreaA.JPG|upright=0.35|thumb|left|alt=UBIKMainArea|UBIKMainArea.xaml]]{{clear}}*UBIKMainPageListHeader.xaml[[File:MainPageListHeader.png|upright=0.35|thumb|left|alt=UBIKMainPageListHeader|UBIKMainPageListHeader.xaml]]{{clear}}
Other than the necessary server side data configuration, a template selector is also needed to achieve this. For example, here's the code snippet in the default UBIKContentArea template.
<syntaxhighlight lang="xml">
...
<Grid xmlns:tpl="using:UBIK.WinX.Templates">
<Grid.Resources>
<tpl:ChildAreaTemplateSelector x:Key="ChildAreaTemplateSelector" />
</Grid.Resources>
<ContentControl ContentTemplateSelector="{StaticResource ChildAreaTemplateSelector}" />
</Grid>
...
</syntaxhighlight>
==== ChildPage ====* UBIKChildItemThe child area template selector used in this example determines the child area template to use based on the following rules.xaml[[File:ChildItemA.JPG|upright=0.35|thumb|left|alt=UBIKChildItem|UBIKChildItem.xaml]]{{clear}}* UBIKChildItemSmall.xamlIf an object defines a child area template name (see [[File:ChildItemSmallA.JPGSYSCLS_CHILDAREATEMPLATE|upright=0.35|thumb|left|alt=UBIKChildItemSmall|UBIKChildItemSmall.xamlchild area template classification]]{{clear}}), return the custom template with that name;* UBIKChildArea.xaml[[File:ChildAreaA.JPG|upright=0.35|thumb|left|alt=UBIKChildArea|UBIKChildArea.xaml]]{{clear}}* UBIKChildAreaSmall.xaml* UBIKChildAction.xaml[[File:ChildActionA.pngVersion/WinXSince|upright=03.35|thumb|left|alt=UBIKChildAction|UBIKChildAction.xaml]]{{clear6}}* UBIKPriorityPropertyItemIf not found and the "Strict Template Loading Policy" setting is turned on, returns an error template; (This can be useful for checking if some templates are missing before the final deployment.xaml)*UBIKChildPageActionIf not found, returns the default UBIKChildArea template.xaml[[File:ChildPageActionA.JPG|upright=0.35|thumb|left|alt=UBIKChildPageAction|UBIKChildPageAction.xaml]]{{clear}}
  ==== DetailsPage ====* UBIKDocumentItem.xaml[[File:DocumentItemA.JPG|upright=0.35|thumb|left|alt=UBIKDocumentItem|UBIKDocumentItem.xaml]]{{clear}}* UBIKDocumentItemSmall.xaml   ===MapView===*UBIKCustomMapPin.xaml[[File:CustomMapPinA.JPGHint|upright=0It's possible to use a different syntax to refer to a custom named template, e.35|thumb|left|alt=UBIKCustomMapPin|UBIKCustomMapPing.xaml]]{{clear}}*UBIKMapPOI.xaml[[File:MapPOIA.JPG|upright=0.35|thumb|left|alt=UBIKMapPOI|UBIKMapPOI.xaml]]{{clear}}*UBIKPOIFlyout.xaml[[File:POIFlyoutA.JPG|upright<ContentControl ContentTemplate=0.35|thumb|left|alt=UBIKPOIFlyout|UBIKPOIFlyout.xaml]]"{{clear}}*UBIKUserPin.xamlBinding TemplateService[[File:UserPinA.JPG|upright=0.35|thumb|left|alt=UBIKUserPin|UBIKUserPin.xamlUBIKChildArea_WorkPackage]]{{clear}" />[[Category:UBIK|UBIK Templates]] ===Global===*UBIKPageAction.xaml[[File:PageActionA.png|upright=0.35|thumb|left|alt=UBIKPageAction|UBIKPageAction.xaml]]{{clear}}*UBIKSearchResultDialogHeader.xaml[[File:SearchResultDIalogHeaderHowever, since the client does not know which default template should be used, an error template will be used if the custom named one can not be found.png|upright=0.35|thumb|left|alt=UBIKSearchResultDialogHeader|UBIKSearchResultDialogHeader.xaml]]{{clear}}*UBIKSearchResultItem.xaml[[File:SearchResultItem.png|upright=0.35|thumb|left|alt=UBIKSearchResultItem|UBIKSearchResultItem.xaml]]{{clear}}*UBIKTopLeft.xaml[[File:TopLeft.png|upright=0.35|thumb|left|alt=UBIKTopLeft|UBIKTopLeft.xaml]]{{clear}}*UbikTopCenter.xaml[[File:TopCenter.png|upright=0.35|thumb|left|alt=UBIKTopCenter|UBIKTopCenter.xaml]]{{clear}}*UbikTopRight.xaml[[File:TopRight.png|upright=0.35|thumb|left|alt=UBIKTopRight|UBIKTopRight.xaml]]{{clear}}*UBIKPropertyArea.xaml[[File:PropertyAreaA.JPG|upright=0.35|thumb|left|alt=UBIKPropertyArea|UBIKPorpertyArea.xaml]]{{clear}}*UBIKPropertyItem.xaml[[File:PropertyItemA.JPG|upright=0.35|thumb|left|alt=UBIKPropertyItem|UBIKPropertyItem.xaml]]{{clear}}*UBIKEdit.xaml[[File:UbikEditA.JPG|upright=0.35|thumb|left|alt=UBIKEdit|UBIKEdit.xaml]]{{clear}}
[[Category:UBIK|UBIK Templates]]
[[Category:Client|UBIK Templates]]
[[Category:WinX|UBIK Templates]]