Elevation property

Official Content
This documentation is valid for:
Used by the developer to configure the shadows cast by controls.


Objects: Theme for Smart Devices
Platforms: Smart Devices(Android, IOS)
Controls: Attribute/Variable, Button, Grid, Group, Image, Tab, Table, Text Block


This property accepts positive numerical values indicating how much shadow the developers want to show.
By default, its value is empty (semantically represents 0).


  • Available for Android 5.0 or higher.
  • Available from GeneXus 15 upgrade 12
  • To see the effect, the background color should be opaque.
  • The space for the control and its shadow must be smaller than its container cell. 
  • If there are controls inside a Canvas with Elevation and ZOrder properties set, the difference between two controls with the same ZOrder is their Elevation.
  • To change the elevation at runtime, change the theme class. For instance, if you have set the Button class for a button control, you can type:
    Button1.Class = ThemeClass:ButtonWithElevation
    where ButtonWithElevation is a theme class with Elevation property set.

Runtime/Design time

This property applies both at run-time and at design-time.


Following Material Design guidelines, the examples below are based on customized buttons.

Previously, in the Theme classes section for Android, these settings were made:

  • Border Style = solid
  • Border Color = 14BBCC
  • Border Width = 1dip
  • Border Radius = 60 dips
  • Background Color = 14BBCC

Next, after dragging the button control from the Toolbox to an abstract layout of a Panel or Work With for Smart Devices, these settings were made:

  • Width = 40 
  • Height = 40
  • Image = <an_add_to_cart_icon>
  • Class = <class_previously_created> 

With this configuration, the button will have a rounded look with a small icon inside it.

Finally, after changing the Elevation property in the Theme class, the effects achieved are shown in the following table:

  Value by default 5 10 20
  Effect Elevation0_png Elevation5_png Elevation10_png Elevation20_png


This property is available since GeneXus 15.

See Also