User Control definition file

Unofficial Content
Warning: Since GeneXus 16, it is strongly recommended to create a User Control object instead of creating a Web User Control. However, what it is explained in this Table of Content is still valid.

This document explains the structure of a User Control definition file (*.control) which is used to define the main characteristics of a User Control.

There are some configurations that cannot be modified using the User Control Editor and the file must be updated manually, these tags are:

  • Version: User Control version.
  • Actions: list of actions to apply when a dragging & dropping a User Control to a WebForm.
  • Categories: check detail below.
  • ResolverFactory: check detail below.
  • Methods: check detail below.
  • ControlType: check detail below.
  • SharedFile: check this article.

.control General structure :

<?xml version="1.0"?> 
<ControlDefinition xmlns:xsi="" xmlns:xsd="">
     <Version /> * Control version
         <Name /> * Control name
         <Description /> * Control description
         <Id /> * Internal identifier for the control
         <ObjClass /> * Internal name of the control
         <Constructor> * Control class constructor
                  <Name /> * Name

          <Parameters />* Parameters


        <ControlType /> * Indicates if the control will be used as a Custom Grid. If value "grid" is set it is considered as a Custom Grid.

     <Categories > * Toolbox categories where the control will be placed.
          <Category />

     <IncludeInControlInfo /> * Is the control included in the Control Info property?. (values can be true or false)
         <ToolboxIcon /> * Icon for use in GeneXus IDE toolbox
         <IsPublic /> * Indicates if the control will be available in the toolbox
     <SupportFiles> * Directories and files used by the control implementation
          <File /> * Files
          <Directory /> * Directories
     <ReferencedFiles> * Referenced files by the control implementation (js, css). References to these files are included in the generated HTML.
          <File /> * Files
     <GxResources /> * XPZ file name with GeneXus resourses needed to use the control (SDTs, Domains, etc.)

     <RuntimeRender /> * Runtime render file name (javascript)
        <ShowMethod /> * Method of the runtime render file used for showing the control
         <ResizeSupported /> * Is resize supported for the control? (values can be true or false)

     <HeightPropertyName /> * Control height property name
     <WidthPropertyName /> * Control width property name
     <PropertiesDefinition /> * Control properties definition file name
         <ResolverFactory /> * Library (dll) which will handle the properties dynamism (i.e. hide properties when some values are selected)

     <DesignRender /> * Control design render file name
         <Html /> * Allows to define a basic render HTML with no need of modified xsl render file. If <DesignRender> is specified this tag has no effect.

     <Events> * User control events, implemented in the runtime render file
          <Event /> * Events
     <Methods> * User control methods 
               <Name /> * Method name
               <ReturnType /> * Type returned by the method
               <Parameters> * Methods parameters
                    <Parameter /> * Parameter type
               <Signature /> * Method signature, used for the Intellisense          

                  // Actions to be executed when using the control (details below in this document)

Actions structure:

     <Order> * Execution order for the action. All actions will be executed following this order (minor number is executed first).
     <ActionProperties> * Action properties
               <Key> * Property key
                    <string /> * Key is specified inside this string tag
               <Value> * Property value
                    <string /> * Value is specified inside this string tag
     <Data /> * Data for action execution
     <ActionType /> * Action type (**)

(**) Three types of actions can be specified on <ActionType> tag, (VarDeclaration, SetPropertyToControl and CodeSnippet), and the available values for the other tags depend on which type is being defined.

Var Declaration:

  • Variables properties have to be defined, for instance:
    • Key: Name, Value: <variableName>
    • Key: ATTCUSTOMTYPE, Value: <variableType>
    • Key: AttCollection, Value: true (if we want to set the variable as a collection)
  • <Data> tag has no effect


  • Only one property is needed with Key: <controlPropertyName> and Value: <propertyValueToSet>, for each control property to be setted
  • <Data> tag has no effect


  • Properties tags have no effect
  • <Data> tag value define the code to be added in the object events.

Some samples of the structure detailed above can be seen in the Hello World control definition file and the GXchart control definition file.


As of GeneXus X Evolution 1, you can define a category for your User Control, so it is listed in a separate section of the Toolbox. To define a category for a User Control you need to edit its .control file, find the following tag: <Categories />, and add your category as described in the example below.

     <Category>GXGoogle Visualization Library</Category>


The Platforms tag needs to be included in the .control file. If the user control is going to be supported by the Abstract Layout add this line:


Otherwise, if only the HTML Editor supports the UC, add


See Also

User control structure overview
HowTo : Define actions in the control definition file of a User Control