Creating a User Control Definition for Smart Devices

Official Content
This documentation is valid for:

To be able to use the user control in GeneXus, you need to provide the user control definition. The definition of a User Control for Smart Devices is similar to the User Controls, with a few additional properties. Notice that the User Control editor is only available for User Controls.

To create your own User Control for SD copy and paste an already existing one and modify the following tags.

  • Change the User Control Name and Description.
  • Set the Version tag to an initial value.
  • Set the user control properties in an XML file and reference it in the PropertiesDefinition tag 
  • Set the Platform to "SmartDevices".
  • If the control is a list one make sure to set the List value on the ControlType tag:


Implementation of specific values

Then, you must fill in the platform specific values.

For iOS

  • You need to package your user control as a library and reference a bundle (resources) if needed using the iOS_SupportFiles property.
  • Declare the class in charge of the User Control for SD implementation using the iOS_ClassName tag.

For Android

  • Declare the class in charge of the User Control for SD implementation using the Android_ClassName tag.


Adding platform default value

As of GeneXus 15 Upgrade 4 it is possible to specify the pd (platform default) value in dips associated with the user control by adding a tag to its definition (*.control file).

For iOS

  • Declare the value in dips using the iOS_PlatformDefault tag.

For Android

  • Declare the value in dips using the Android_PlatformDefault tag.

For both

  • Declare the value in dips using the PlatformDefault tag.


Since Genexus 16 upgrade 2, when defining a user control of type List, you are able to hide the Row property and you can also indicate a fixed value. Example: Inside the GeneXus installation directory (Gx installation directory UserControls \ SmartDevicesMapControl \ sdmapcontrol.control) you can find the user control SDMaps :
   <Value>&lt;unlimited&gt;</Value><!-- does not support paging, so it must be unlimited -->

Note that in the example the property Row is hidden and the unlimited value has been set.


GeneXus activation

Execute GeneXus with the /install option and make sure it is available.