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:
Then, you must fill in the platform specific values.
- 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.
- Declare the class in charge of the User Control for SD implementation using the Android_ClassName tag.
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).
- Declare the value in dips using the iOS_PlatformDefault tag.
- Declare the value in dips using the Android_PlatformDefault tag.
- 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.
Inside the GeneXus installation directory (Gx installation directory
UserControls \ SmartDevicesMapControl \ sdmapcontrol.control) you can find the user control SDMaps :
<Value><unlimited></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.
Execute GeneXus with the /install option and make sure it is available.