Elevation property

Official Content
This documentation is valid for:
It is used by the developer to configure the shadow that the controls cast.


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


  • Available for Android 5.0 or higher versions.
  • For is available from GeneXus 15 upgrade 12
  • In order to appreciate the effect, the background color should be set an opaque background.
  • 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 same ZOrder is their Elevation.
  • For changing the elevation at runtime you must change the theme-class. For instance, if you have set Button class to a button control, you can do:
    Button1.Class = ThemeClass:ButtonWithElevation
    being ButtonWithElevation a theme class with Elevation property set.


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


In order to follow Material Design guidelines, the following examples are based on customized buttons.

Previously, on the Theme classes section for Android, we set:

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

Then, after drag and drop the button control from the Toolbox to an abstract layout of a Panel or Work With for Smart Devices, we set for it:

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

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

Finally, varying the Elevation property on the Theme class, the effects achieved is 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.


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

See Also