Style actions syntax

Syntax of different style actions depend on the type of the action (i.e. the type of the property assigned to a theme element).

 

There are three basic types of style actions (= properties) which include a different number of attributes and follow different syntactic rules - atomic , record , and polymorphic .

 

Atomic style actions

Atomic style actions have only one value which

Syntax:

<DoStyleAction>

    <SetProperty>

       <PropertyPath>

          <PropertyName>AtomPropName</PropertyName>

       </PropertyPath>

       <PropertyValue>AtomPropVal</PropertyValue>

    </SetProperty>

</DoStyleAction>

AtomPropName = name of the atomic style action

AtomPropVal = value of the atomic style action

Usage and examples:

Exact syntax of an atomic property depends on it data type:

string

value is a string:

         

needs no quotation marks

 

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>Target</PropertyName>

      </PropertyPath>

      <PropertyValue>w2</PropertyValue>

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>Target</PropertyName>

      </PropertyPath>

      <PropertyValue>"w2"</PropertyValue>

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

 

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>ComponentPath</PropertyName>

      </PropertyPath>

      <PropertyValue>qx://application/map.html</PropertyValue>

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

 

 

 

Actions in the list: ComponentPath, Component Type, InvokeAction, Parameter, StartMenuShortcut, Target, TemplateName, Title, Tool Tip

number

value is a number:

         

needs no quotation marks,

can be set by a slider in Lycia Form Designer

 

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>RowHeight</PropertyName>

      </PropertyPath>

      <PropertyValue>100</PropertyValue>

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

 

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>RowHeight</PropertyName>

      </PropertyPath>

      <PropertyValue>"100"</PropertyValue>

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

 

Actions in the list: Buffer Count, Indent, Row Height, Timeout

boolean

value can be true or false:

when true, needs an empty PropertyValue action,

when false, needs no PropertyValue action

 

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>EnableBorder</PropertyName>

      </PropertyPath>

      <PropertyValue />

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>EnableBorder</PropertyName>

      </PropertyPath>

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

 

Actions in the list: Allow New Lines, Collapsed, Editable, EnableBorder, Enable MultiSelection, FullScreen, Hide Labels, Is Password Mask, IsRaised, NoResize, NoScalePixelCoord, RelativeToParent, Reverse, ShowSplash, Unsortable, Use Tabs, Visible

enum

value is selected from the list of values:

needs no quotation marks,

the default value is not added to the XML code if set in Lycia Theme Designer

 

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>ToolbarLocation</PropertyName>

      </PropertyPath>

      <PropertyValue>Right</PropertyValue>

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>ToolbarLocation</PropertyName>

      </PropertyPath>

      <PropertyValue>"Right"</PropertyValue>

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

 

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>BorderPanelItemLocation</PropertyName>

      </PropertyPath>

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

=

 

Actions in the list: Border Panel Item Location, Cursor, Horizontal Alignment, RingMenuStyle, Toolbar Location, Horizontal Alignment, Viewer Type, Window Style

Above correct examples are given in a standard .qxtheme color scheme and bear ; wrong examples are given in brown and bear .

Record style actions

Record style actions include several sub-actions which

Syntax:

<DoStyleAction>

  <SetProperty>

    <PropertyPath>

      <PropertyName>RecPropName</PropertyName>

    </PropertyPath>

    <PropertyValue type="RecType" AtomPropName="AtomPropVal" [...]>

      <RecName RecAttrName="RecAttrVal" [...] />

      [...]

    </PropertyValue>

  </SetProperty>

</DoStyleAction>

RecPropName = name of the record style action

RecType =  type of the record style action

AtomPropName = name of an atomic style action which is included in the record style action

AtomPropVal = value of an atomic style action which is included in the record style action

RecName = name of a single record which is included in the record style action

RecAttrName = attribute name of a single record which is included in the record style action

RecAttrVal =  attribute value of a single record which is included in the record style action

RecName, RecAttrName, and RecAttrVal are optional for some record style actions.

Usage and examples:

 

<?xml version="1.0" encoding="utf-8"?>

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>Margin</PropertyName>

      </PropertyPath>

      <PropertyValue type="Thickness" Left="5" Top="5" Right="5" Bottom="5" />

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

 

 

<?xml version="1.0" encoding="utf-8"?>

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>Font</PropertyName>

      </PropertyPath>

      <PropertyValue type="Font" Bold="True" Italic="True" Underline="True" FontSize="15">

        <Family>

          <Name>Cambria</Name>

        </Family>

      </PropertyValue>

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

 

<?xml version="1.0" encoding="utf-8"?>

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>Background</PropertyName>

      </PropertyPath>

      <PropertyValue type="Background" BackgroundStyle="Centered">

        <BackgroundImage type="ResourceId" Uri="qx://application/image.jpg" />

        <Size Width="150" Height="150" />

        <Location XCoord="25" YCoord="25" />

      </PropertyValue>

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

Actions in the list: Background, Column Length, Component Properties, Element Border, Font, Grid Item Location, Image, Image Collapsed, Image Expanded, ImageID, Image URL, Location, Margin, Max Size, Min Size, Padding, Preferred Size, Text Alignment, Title Bar Icon, Title Bar Options

Polymorphic style actions

Polymorphic style actions are record style actions which have different values depending on the type of this style action or on the sub-actions included.

Syntax:

<DoStyleAction>

  <SetProperty>

    <PropertyPath>

      <PropertyName>PropName</PropertyName>

      [...]

    </PropertyPath>

    <PropertyValue type="PropOpt" SubPropName="SubPropVal" [...] />

  </SetProperty>

</DoStyleAction>

PropName = name of the polymorphic style action

PropOpt = one of the options available for this style action

SubPropName = name of the sub-property (depending on the chosen option)

SubPropVal = value of the sub-property

Usage and examples:

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>ForeColor</PropertyName>

      </PropertyPath>

      <PropertyValue type="CustomizedColor" RedColor="0" GreenColor="128" BlueColor="0" Alpha="255" />

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

<?xml version="1.0" encoding="utf-8"?>

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>ForeColor</PropertyName>

      </PropertyPath>

      <PropertyValue type="DefaultColor" />

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

 

<?xml version="1.0" encoding="utf-8"?>

<StyleSheet xmlns="http://querix.com">

  <DoStyleAction>

    <SetProperty>

      <PropertyPath>

        <PropertyName>ForeColor</PropertyName>

      </PropertyPath>

      <PropertyValue type="SystemColor" SystemColorName="Green" />

    </SetProperty>

  </DoStyleAction>

</StyleSheet>

 

Actions in the list: Fill Color, Fore Color

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.