Skip to main content

Information

Documentation

Shell XAML

Shell.xaml is the main entry point of the app and defines the data model and navigation.

Entities

πŸ’‘
Key field must be of type Guid if you want to create records offline

Entity

Field

Field Types

  • Guid
  • String
  • DateTime
  • Number
  • Integer
  • Boolean
  • Geometry
  • Binary
  • AutoIncrement
  • UnixTimestamp
  • Timestamp
πŸ’‘
AutoIncrement, Timestamp and UnixTimestamp are automatically updated on modification of an entity.

Sync Types

Value Description
None Entity is only available online
Automatic Entity is synced automatically on each login
Automatic (with revision field) Entity is synced automatically on each login, but only changes which have a higher value in the revison field since last sync (diff sync)
Manual Entity will only be synced once. You can sync it manually in the Synchronization view

Intersection Modes

Intersection mode is used to define which geometry field is used for intersection. Currently only one geometry field with IntersectionMode="Intersects" is supported.

Value Description
None Geometry field is ignored
Intersects Geometry field is used to filter entities if an area is selected (Default)
πŸ’‘
Applies only to geometry fields.

Storage Types

Value Description
Database Binary field is stored in database (Default)
FileSystem Binary field is stored on the file system
πŸ’‘
Applies only to binary fields with LazyLoading="True"

Filter Operators

Value
None
Equal
Contains
GreaterThan
GreaterEqual
LessThan
LessEqual
πŸ’‘
Applies only to forms used in a filter

Validators

Filters

You can use placeholders in the Sql attribute with the following syntax

In addition the following System placeholders are available

  • @{System.UserId}
  • @{System.UserName}
  • @{System.DeviceId}
  • @{System.Now}
  • @{System.DeviceCulture}
  • @{System.LanguageName}
  • @{System.ActiveAreaId}

Triggers

πŸ’‘
Applies only to forms used in a filter

Id and Method attribute applies to all trigger types.

Trigger Methods

  • BeforeSave
  • BeforeUpdate
  • BeforeDelete
  • AfterSave
  • AfterUpdate
  • AfterDelete
  • Manual
πŸ’‘
Applies only to forms used in a filter

You can specify multiple methods separated with a comma

Tiles

Configuration of tile sources for map views (WMTS, WMS and TMS). Projection must be EPSG:3857.

Views

Defines a menu configuration.

πŸ’‘
Applies only to forms used in a filter

Target can be a view id from Shell.xaml or AppSelection/Logout

Menu Action Type

  • Menu
  • Toolbar

List XAML

Defines a list configuration.

πŸ’‘
Applies only to forms used in a filter

Name of your XAML file is the view name in Shell.xaml

Shell Actions

Shell Action Type

  • Primary
  • Secondary

Row Actions

Sort

Sort Order

  • Ascending
  • Descending

Cells

Display Size

  • Small
  • Medium
  • Large

Word Wrap

  • NoWrap
  • WordWrap
  • CharacterWrap
  • HeadTruncation
  • TailTruncation
  • MiddleTruncation

Form XAML

Defines a form configuration.

πŸ’‘
Applies only to forms used in a filter

Name of your XAML file is the view name in Shell.xaml

Shell Actions

Shell Action Type

  • Primary
  • Secondary

Scripts

Fields

Sort

Field Actions

Map XAML

Defines a map configuration.

πŸ’‘
Applies only to forms used in a filter

Name of your XAML file is the view name in Shell.xaml

πŸ’‘
Applies only to forms used in a filter

MinimumUpdateTime in milliseconds MinimumUpdateDistance in meters

Shell Actions

Shell Action Type

  • Primary
  • Secondary

Layers

Native Layer Type

  • Roads
  • Satellite
  • Hybrid

JavaScript API

General

List

Form

Map

Scripts can be used in multiple ways

Claims

Claims can be used to restrict visibility of fields, actions, menu items and layers. If no claim is defined, the item is visible to all users.

The following syntax is supported:

  • Claim1
  • Claim1,Claim2 (OR)
  • Claim1+Claim2 (AND)

Localization

Add a file named Shell..resx (e.g.: Shell.de.resx) in a folder named Resources inside the shell folder.

The resource key is defined in the following way:

πŸ’‘
Applies only to forms used in a filter

_

  • PageTitle
  • Menu
  • Label (used for script localizations)
πŸ’‘
Applies only to forms used in a filter

__

  • Field
  • Help
  • List
  • Table
  • FieldTab
  • Filter
  • OptionsGroup
  • KeyValueList
  • FeatureInfo_Title
  • FeatureInfo_Detail

Examples

Graphics

Icons

Icon Name Icon Name Icon Name Icon Name Icon Name
AppSelect AreaList Back Bell Chat
Checklist Compass DataSource Delete DeviceList
Distance Down Download Filter Flag
Gps Hamburger Help Home Info
Left LineList List Logging Logout
Map Message More New Password
PinList QRCode Request Right RightList
SatelliteMap Save Setting Start Stop
StreetMap Summary Synchronize Text TopoMap
Up Url User UserList Walk
Work World X

Actions

Icon Name Icon Name Icon Name Icon Name Icon Name
Alert Attachment Bicycle Bin Camera
Car Check Click Clock Delete
Edit EditArea EditLine EditPin Expand
Gps Helicopter Info Layer Map
Micro Minus More NewArea NewLine
NewPin Pause Pdf Phone Plus
Prev Question Refresh Save Search
Signature Start Stop View Walk
World

Map

Icon Name Icon Name Icon Name Icon Name Icon Name
Area Arrow Bicycle Car Delete
Edit End Helicopter Line Pin
Plus Start Walk

Server Side Customization

πŸ’‘
Applies only to forms used in a filter

You need Visual Studio to create custom triggers and providers

Create a C# class library and reference the following assemblies from the Mobile/bin directory:

πŸ’‘
Applies only to forms used in a filter

AppShell.Core.dll AppShell.Services.Core.dll

Compile the class library and copy it into the Mobile/bin directory.

Custom Triggers

The following trigger will simply add the values of the two form fields Field1 and Field2 and store the result in the SumField.

You can use the custom trigger in the Shell.xaml like that:

Custom Providers

IUserSessionProvider

The user session provider is called when an app is selected in the app selection screen.

IUserHandler

The user handler is called after a login, after an app has been selected in the app selection screen and after the user actually logged into the selected app.

Samples

Shell

Apply a default filter to an entity

Filter an entity by user id

Filter an entity by a date field

πŸ’‘
Applies only to forms used in a filter

Dates are stored in ticks (100 nanoseconds) since 12:00:00 midnight, January 1, 0001 in the Gregorian calendar 1e7 is equal to one second in ticks and 86400 are 24 hours in seconds

Add a regex validator to a field

Add a trigger to an entity which is executed before an insert or update and sets the current user id

Using a TMS tile source

Using a restful WMTS tile source

Using a WMS tile source

Using a M.App Enterprise "My Geoservices" WMS tile source

Using a M.App Enterprise "My Geoservices" WMTS tile source with caching on demand

Using a M.App Enterprise "My Geoservices" WMTS tile source which has been published

πŸ’‘
Applies only to forms used in a filter

You need to replace with the current cache version from your warehouse:
\\WmtsCache\\google3857\

Using a M.App Enterprise "Imagery" WMTS tile source

List

Show a field in a list

Show distance from current GPS position to geometry center

Show an image in a list depending on a field

πŸ’‘
Applies only to forms used in a filter

If the value of status would be 2, the icon would resolve to Icons/Status2.png in the shell folder

Show an image in a list depending on a field with a mapping

πŸ’‘
Applies only to forms used in a filter

If the value of status would be 2, the icon would resolve to Icons/Green.png in the shell folder If the value is not found in the mapping it will fallback to Icons/Red.png

Show an image in a list depending on a script value

πŸ’‘
Applies only to forms used in a filter

If begintime is in the past it will show Icons/Red.png, otherwise it will show Icons/Green.png

Show multiple fields in one cell

Show date value with a specific format

Format Description en-US de-DE
d Short date pattern. 6/15/2009 15.06.2009
D Long date pattern. Monday, June 15, 2009 Montag, 15. Juni 2009
f Full date/time pattern (short time). Monday, June 15, 2009 1:45 PM Montag, 15. Juni 2009 13:45
F Full date/time pattern (long time). Monday, June 15, 2009 1:45:30 PM Montag, 15. Juni 2009 13:45:30
g General date/time pattern (short time). 6/15/2009 1:45 PM 15.06.2009 13:45
G General date/time pattern (long time). 6/15/2009 1:45:30 PM 15.06.2009 13:45:30
M Month/day pattern. June 15 15. Juni
s Sortable date/time pattern. 2009-06-15T13:45:30 2009-06-15T13:45:30
t Short time pattern. 1:45 PM 13:45
T Long time pattern. 1:45:30 PM 13:45:30
u Universal sortable date/time pattern. 2009-06-15 13:45:30Z 2009-06-15 13:45:30Z
U Universal full date/time pattern. Monday, June 15, 2009 11:45:30 AM Montag, 15. Juni 2009 11:45:30
Y Year month pattern. June 2009 Juni 2009

Standard Date and Time Format Strings

Sort a list

Add a row action which navigates to a map view and centers the map to geometry center

Map value of a field to a display value in a list cell

Show value of a foreign entity in a list cell

Enable search in a list

Enable search in a list on a foreign field

Enable filtering in a list

Form

Picker with static values

Picker with static keys and values

Picker with values from an entity

Picker with values from an entity sorted by a field

Picker with values from an entity and a filter applied

Picker with values filtered based on another picker

DateTimePicker with a field action to set current date and time

Using a script field action to set a field value

Validate if a user is near an object before saving it

Add an image picker to your form

πŸ’‘
Applies only to forms used in a filter

PreviewField (optional field to store a thumbnail)
SizeField (optional field to store size of captured image)
MimeTypeField (optional field to store mime type of captured image)

Add an image preview to your form

πŸ’‘
Applies only to forms used in a filter

SourceField (field which is used for preview)

Add support for paging to your form

Add an options group with a single selection

Add an options group with multiple selections allowed separated by a comma

Add an options group with multiple selections allowed saved into multiple boolean fields

Group fields in a form

Show fields in different tab groups

Capture a point geometry

Capture a line geometry

Capture a polygon geometry

Populate an entry from a web service

Call a web service before saving

Confirm an action before executing it

Set items of a Picker from a script

Map

Map with native roads and satellite layer

Reference a tile layer from Shell.xaml

Add a marker vector layer with one of the embedded map icons

Add a marker vector layer with an icon you deliver within the shell folder In this example a folder Icons with a file MyIcon.png inside is expected in the shell folder. You must also include MyIcon@2x.png, MyIcon@3x.png, MyIcon@4x.png for high DPI devices.

Add a marker vector layer with an icon depending on a field

Add a marker vector layer with a filter applied

Show feature info on selection of a marker

Add a line vector layer

Add a polygon vector layer

Capture a point geometry

Capture a line geometry

Capture a polygon geometry