Documentation
Shell XAML
Shell.xaml is the main entry point of the app and defines the data model and navigation.
Entities
Entity
Field
Field Types
- Guid
- String
- DateTime
- Number
- Integer
- Boolean
- Geometry
- Binary
- AutoIncrement
- UnixTimestamp
- Timestamp
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) |
Storage Types
Value | Description |
---|---|
Database | Binary field is stored in database (Default) |
FileSystem | Binary field is stored on the file system |
Filter Operators
Value |
---|
None |
Equal |
Contains |
GreaterThan |
GreaterEqual |
LessThan |
LessEqual |
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
Id and Method attribute applies to all trigger types.
Trigger Methods
- BeforeSave
- BeforeUpdate
- BeforeDelete
- AfterSave
- AfterUpdate
- AfterDelete
- Manual
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
Menu XAML
Defines a menu configuration.
Menu Items
Target can be a view id from Shell.xaml or AppSelection/Logout
Menu Action Type
- Menu
- Toolbar
List XAML
Defines a list configuration.
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.
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.
Name of your XAML file is the view name in Shell.xaml
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.
The resource key is defined in the following way:
- PageTitle
- Menu
- Label (used for script localizations)
- 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 | 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
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:
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
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
You need to replace
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
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
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
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
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
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