Răsfoiți Sursa

add Gallery control

Dalibor Votruba 11 luni în urmă
părinte
comite
06c4d7f799

+ 203 - 63
UILayoutDefinitionFormat/Definitions/abstract-controls.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Abstract Control Definitions for UI Layout Definition Format -->
-<!-- Version: 1.0 -->
+<!-- Version: 1.3 - Updated with Gallery Control -->
 <patterns xmlns="ui-layout-patterns">
   
   <!-- Base Abstract Control -->
@@ -67,65 +67,10 @@
     </behavior>
   </control>
 
-  <control name="Separator" type="visual" category="basic" inherits="CommonControl">
-    <description>Visual separator control for dividing interface sections</description>
-    <constraints>
-      <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,Menu</allowed-parents>
-      <allowed-children>none</allowed-children>
-      <container>false</container>
-    </constraints>
-    <attributes>
-      <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
-      <attribute name="line-style" type="enum" values="solid,dashed,dotted,double,groove,ridge,inset,outset" default="solid" />
-      <attribute name="line-width" type="int" min="1" max="10" default="1" />
-      <attribute name="line-color" type="string" default="gray" />
-      <attribute name="auto-size" type="bool" default="true" />
-      <attribute name="margin-start" type="int" min="0" max="50" default="0" />
-      <attribute name="margin-end" type="int" min="0" max="50" default="0" />
-    </attributes>
-    <behavior>
-      <event name="paint" />
-    </behavior>
-  </control>
-
-  <control name="Image" type="display" category="basic" inherits="CommonControl">
-    <description>Image display control for showing pictures and graphics</description>
-    <constraints>
-      <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField,Button</allowed-parents>
-      <allowed-children>none</allowed-children>
-      <container>false</container>
-    </constraints>
-    <attributes>
-      <attribute name="source" type="string" required="true" />
-      <attribute name="source-type" type="enum" values="file,url,resource,base64,stream" default="file" />
-      <attribute name="size-mode" type="enum" values="normal,stretch-image,auto-size,center-image,zoom" default="normal" />
-      <attribute name="aspect-ratio" type="enum" values="ignore,keep,keep-by-expanding" default="keep" />
-      <attribute name="interpolation-mode" type="enum" values="default,low,high,bilinear,bicubic,nearest-neighbor" default="default" />
-      <attribute name="error-image" type="string" default="" />
-      <attribute name="loading-image" type="string" default="" />
-      <attribute name="border-style" type="enum" values="none,single,raised,sunken" default="none" />
-      <attribute name="cursor-hand" type="bool" default="false" />
-      <attribute name="allow-drop" type="bool" default="false" />
-      <attribute name="cache-image" type="bool" default="true" />
-      <attribute name="async-load" type="bool" default="false" />
-      <attribute name="rotation" type="enum" values="none,rotate90,rotate180,rotate270" default="none" />
-      <attribute name="flip" type="enum" values="none,horizontal,vertical,both" default="none" />
-      <attribute name="opacity" type="double" min="0.0" max="1.0" default="1.0" />
-      <attribute name="grayscale" type="bool" default="false" />
-      <attribute name="alt-text" type="string" default="" />
-    </attributes>
-    <behavior>
-      <event name="image-loaded" />
-      <event name="image-load-error" />
-      <event name="image-load-progress" />
-      <event name="size-changed" />
-    </behavior>
-  </control>
-
   <!-- INPUT CONTROLS -->
   
   <control name="TextBox" type="input" category="basic" inherits="CommonControl">
-    <description>Single-line text input control for user text entry</description>
+    <description>Single-line text input control for user data entry</description>
     <constraints>
       <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField</allowed-parents>
       <allowed-children>none</allowed-children>
@@ -133,15 +78,12 @@
     </constraints>
     <attributes>
       <attribute name="max-length" type="int" min="0" max="32767" default="32767" />
+      <attribute name="password-char" type="string" default="" />
       <attribute name="read-only" type="bool" default="false" />
       <attribute name="multiline" type="bool" default="false" />
-      <attribute name="password-char" type="string" default="" />
-      <attribute name="placeholder-text" type="string" default="" />
-      <attribute name="text-align" type="enum" values="left,center,right" default="left" />
-      <attribute name="accepts-return" type="bool" default="false" />
-      <attribute name="accepts-tab" type="bool" default="false" />
       <attribute name="word-wrap" type="bool" default="true" />
-      <attribute name="scroll-bars" type="enum" values="none,horizontal,vertical,both" default="none" />
+      <attribute name="accept-returns" type="bool" default="false" />
+      <attribute name="accept-tabs" type="bool" default="false" />
       <attribute name="auto-complete-mode" type="enum" values="none,suggest,append,suggest-append" default="none" />
       <attribute name="auto-complete-source" type="string" default="" />
     </attributes>
@@ -304,6 +246,12 @@
       <attribute name="header-style" type="enum" values="none,clickable,non-clickable" default="clickable" />
       <attribute name="sorting" type="enum" values="none,ascending,descending" default="none" />
       <attribute name="allow-column-reorder" type="bool" default="false" />
+      <attribute name="scrollable" type="bool" default="true" />
+      <attribute name="border-style" type="enum" values="none,single,raised,sunken,double" default="single" />
+      <attribute name="auto-arrange" type="bool" default="true" />
+      <attribute name="label-edit" type="bool" default="false" />
+      <attribute name="label-wrap" type="bool" default="false" />
+      <attribute name="hide-selection" type="bool" default="true" />
       <attribute name="hover-selection" type="bool" default="false" />
       <attribute name="hot-tracking" type="bool" default="false" />
       <attribute name="virtual-mode" type="bool" default="false" />
@@ -324,6 +272,66 @@
     </structure>
   </control>
 
+  <!-- NEW: GALLERY CONTROL -->
+  <control name="Gallery" type="list" category="basic" inherits="CommonControl">
+    <description>Gallery control for displaying collection of items in customizable boxes with templates</description>
+    <constraints>
+      <allowed-parents>Panel,SplitPanel,PopupPanel,TabPage</allowed-parents>
+      <allowed-children>GalleryItem</allowed-children>
+      <container>true</container>
+      <requires-structure>gallery-items,box-template</requires-structure>
+    </constraints>
+    <attributes>
+      <!-- Inherited ListView attributes -->
+      <attribute name="view-mode" type="enum" values="details,list,large-icons,small-icons,tiles,gallery" default="gallery" />
+      <attribute name="multi-select" type="bool" default="false" />
+      <attribute name="full-row-select" type="bool" default="false" />
+      <attribute name="grid-lines" type="bool" default="false" />
+      <attribute name="header-style" type="enum" values="none,clickable,non-clickable" default="none" />
+      <attribute name="sorting" type="enum" values="none,ascending,descending" default="none" />
+      <attribute name="allow-column-reorder" type="bool" default="false" />
+      <attribute name="scrollable" type="bool" default="true" />
+      <attribute name="border-style" type="enum" values="none,single,raised,sunken,double" default="single" />
+      <attribute name="auto-arrange" type="bool" default="true" />
+      <attribute name="label-edit" type="bool" default="false" />
+      <attribute name="label-wrap" type="bool" default="false" />
+      <attribute name="hide-selection" type="bool" default="true" />
+      <attribute name="hover-selection" type="bool" default="false" />
+      <attribute name="hot-tracking" type="bool" default="false" />
+      <attribute name="virtual-mode" type="bool" default="false" />
+      <attribute name="virtual-list-size" type="int" min="0" default="0" />
+      
+      <!-- Gallery-specific attributes -->
+      <attribute name="image-width" type="int" min="16" max="512" default="64" />
+      <attribute name="image-height" type="int" min="16" max="512" default="64" />
+      <attribute name="box-width" type="int" min="32" max="1024" default="120" />
+      <attribute name="box-height" type="int" min="32" max="1024" default="120" />
+      <attribute name="paging-enabled" type="bool" default="false" />
+      <attribute name="paging-page-size" type="int" min="1" max="1000" default="50" />
+    </attributes>
+    <behavior>
+      <!-- Inherited ListView events -->
+      <event name="selected-index-changed" />
+      <event name="item-activate" />
+      <event name="column-click" />
+      <event name="before-label-edit" />
+      <event name="after-label-edit" />
+      <event name="item-check" />
+      <event name="virtual-items-selection-range-changed" />
+      
+      <!-- Gallery-specific events -->
+      <event name="box-click" />
+      <event name="box-double-click" />
+      <event name="box-hover" />
+      <event name="page-changed" />
+      <event name="template-applied" />
+    </behavior>
+    <structure>
+      <gallery-items max-count="unbounded" />
+      <box-template required="true" />
+    </structure>
+  </control>
+
   <control name="TreeView" type="list" category="basic" inherits="CommonControl">
     <description>Hierarchical tree view control for displaying nested data</description>
     <constraints>
@@ -366,6 +374,52 @@
     </structure>
   </control>
 
+  <!-- VISUAL CONTROLS -->
+  
+  <control name="Separator" type="visual" category="basic" inherits="CommonControl">
+    <description>Visual separator control for dividing interface sections</description>
+    <constraints>
+      <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,Menu</allowed-parents>
+      <allowed-children>none</allowed-children>
+      <container>false</container>
+    </constraints>
+    <attributes>
+      <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
+      <attribute name="line-style" type="enum" values="solid,dashed,dotted,double,groove,ridge,inset,outset" default="solid" />
+      <attribute name="line-width" type="int" min="1" max="10" default="1" />
+      <attribute name="line-color" type="string" default="gray" />
+      <attribute name="auto-size" type="bool" default="true" />
+      <attribute name="margin-start" type="int" min="0" max="50" default="0" />
+      <attribute name="margin-end" type="int" min="0" max="50" default="0" />
+    </attributes>
+    <behavior>
+      <event name="paint" />
+    </behavior>
+  </control>
+
+  <control name="Image" type="display" category="basic" inherits="CommonControl">
+    <description>Image display control for showing pictures and graphics</description>
+    <constraints>
+      <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField,Button</allowed-parents>
+      <allowed-children>none</allowed-children>
+      <container>false</container>
+    </constraints>
+    <attributes>
+      <attribute name="source" type="string" required="true" />
+      <attribute name="source-type" type="enum" values="file,url,resource,base64,stream" default="file" />
+      <attribute name="size-mode" type="enum" values="normal,stretch-image,auto-size,center-image,zoom" default="normal" />
+      <attribute name="aspect-ratio" type="enum" values="keep,ignore,fit" default="keep" />
+      <attribute name="interpolation-mode" type="enum" values="default,low,high,bilinear,bicubic,nearest-neighbor" default="default" />
+      <attribute name="error-image" type="string" default="" />
+      <attribute name="loading-image" type="string" default="" />
+    </attributes>
+    <behavior>
+      <event name="load-completed" />
+      <event name="load-progress" />
+      <event name="load-failed" />
+    </behavior>
+  </control>
+
   <!-- STRUCTURAL DEFINITIONS -->
   
   <structure name="ListBoxItem" type="data-item" category="basic">
@@ -401,6 +455,92 @@
     </structure>
   </structure>
 
+  <!-- NEW: GALLERY STRUCTURES -->
+  <structure name="GalleryItem" type="data-item" category="basic">
+    <description>Individual item within Gallery control with custom box template support</description>
+    <attributes>
+      <attribute name="text" type="string" required="true" />
+      <attribute name="value" type="string" default="" />
+      <attribute name="selected" type="bool" default="false" />
+      <attribute name="checked" type="bool" default="false" />
+      <attribute name="focused" type="bool" default="false" />
+      <attribute name="image" type="string" default="" />
+      <attribute name="image-index" type="int" default="-1" />
+      <attribute name="image-key" type="string" default="" />
+      <attribute name="thumbnail" type="string" default="" />
+      <attribute name="group" type="string" default="" />
+      <attribute name="tooltip" type="string" default="" />
+      <attribute name="tag" type="object" default="null" />
+      <!-- Gallery-specific attributes -->
+      <attribute name="box-data" type="object" default="null" />
+      <attribute name="template-override" type="string" default="" />
+    </attributes>
+    <structure>
+      <custom-properties max-count="unbounded" />
+      <data-fields max-count="unbounded" />
+    </structure>
+  </structure>
+
+  <structure name="BoxTemplate" type="template" category="basic">
+    <description>Custom template definition for Gallery box rendering</description>
+    <attributes>
+      <attribute name="name" type="string" required="true" />
+      <attribute name="width" type="int" min="32" max="1024" default="120" />
+      <attribute name="height" type="int" min="32" max="1024" default="120" />
+      <attribute name="background-color" type="string" default="transparent" />
+      <attribute name="border-color" type="string" default="gray" />
+      <attribute name="border-style" type="enum" values="none,solid,dashed,dotted" default="solid" />
+      <attribute name="border-width" type="int" min="0" max="10" default="1" />
+      <attribute name="padding" type="string" default="4,4,4,4" />
+      <attribute name="margin" type="string" default="2,2,2,2" />
+    </attributes>
+    <structure>
+      <template-elements max-count="unbounded" />
+    </structure>
+  </structure>
+
+  <structure name="TemplateElement" type="template-item" category="basic">
+    <description>Individual element within a box template (image, text, custom control)</description>
+    <attributes>
+      <attribute name="name" type="string" required="true" />
+      <attribute name="type" type="enum" values="image,text,label,custom" required="true" />
+      <attribute name="x" type="int" min="0" default="0" />
+      <attribute name="y" type="int" min="0" default="0" />
+      <attribute name="width" type="string" default="auto" />
+      <attribute name="height" type="string" default="auto" />
+      <attribute name="data-binding" type="string" default="" />
+      <attribute name="format-string" type="string" default="" />
+      <attribute name="font-family" type="string" default="system" />
+      <attribute name="font-size" type="int" min="6" max="72" default="12" />
+      <attribute name="font-style" type="enum" values="normal,italic,bold,bold-italic" default="normal" />
+      <attribute name="foreground-color" type="string" default="black" />
+      <attribute name="text-align" type="enum" values="left,center,right,justify" default="left" />
+      <attribute name="vertical-align" type="enum" values="top,middle,bottom" default="top" />
+      <attribute name="image-size-mode" type="enum" values="normal,stretch,auto-size,center,zoom" default="normal" />
+      <attribute name="anchor" type="enum" values="none,left,right,top,bottom,all" default="none" />
+    </attributes>
+  </structure>
+
+  <structure name="CustomProperty" type="data-item" category="basic">
+    <description>Custom property for gallery items to store additional data</description>
+    <attributes>
+      <attribute name="name" type="string" required="true" />
+      <attribute name="value" type="string" required="true" />
+      <attribute name="data-type" type="enum" values="text,number,date,boolean,image,object" default="text" />
+    </attributes>
+  </structure>
+
+  <structure name="DataField" type="data-item" category="basic">
+    <description>Data field definition for binding template elements to data</description>
+    <attributes>
+      <attribute name="name" type="string" required="true" />
+      <attribute name="value" type="string" required="true" />
+      <attribute name="display-name" type="string" default="" />
+      <attribute name="format" type="string" default="" />
+    </attributes>
+  </structure>
+
+  <!-- REMAINING EXISTING STRUCTURES -->
   <structure name="ColumnItem" type="data-item" category="basic">
     <description>Column definition for ListView control</description>
     <attributes>

+ 204 - 63
UILayoutDefinitionFormat/ui-layout-basic-controls.xsd

@@ -57,11 +57,13 @@
       
       <!-- List Controls -->
       <xs:element name="ListView" type="tns:ListViewType"/>
+      <xs:element name="Gallery" type="tns:GalleryType"/>
       <xs:element name="TreeView" type="tns:TreeViewType"/>
       
       <!-- Structure Elements -->
       <xs:element name="ListBoxItem" type="tns:ListBoxItemType"/>
       <xs:element name="ListViewItem" type="tns:ListViewItemType"/>
+      <xs:element name="GalleryItem" type="tns:GalleryItemType"/>
       <xs:element name="ColumnItem" type="tns:ColumnItemType"/>
       <xs:element name="TreeNode" type="tns:TreeNodeType"/>
       <xs:element name="MenuItem" type="tns:MenuItemType"/>
@@ -71,7 +73,7 @@
   <!-- DISPLAY CONTROLS -->
   
   <!-- Label Control Type -->
-  <xs:complexType name="LabelType">
+  <xs:complexType name="LabelType" mixed="true">
     <xs:complexContent>
       <xs:extension base="tns:BasicControlInstanceType">
         <xs:attribute name="auto-size" type="xs:boolean" default="true"/>
@@ -85,7 +87,7 @@
   </xs:complexType>
 
   <!-- Separator Control Type -->
-  <xs:complexType name="SeparatorType">
+  <xs:complexType name="SeparatorType" mixed="true">
     <xs:complexContent>
       <xs:extension base="tns:BasicControlInstanceType">
         <xs:attribute name="orientation" type="tns:OrientationEnum" default="horizontal"/>
@@ -100,7 +102,7 @@
   </xs:complexType>
 
   <!-- Image Control Type -->
-  <xs:complexType name="ImageType">
+  <xs:complexType name="ImageType" mixed="true">
     <xs:complexContent>
       <xs:extension base="tns:BasicControlInstanceType">
         <xs:attribute name="source" type="xs:string" use="required"/>
@@ -110,16 +112,6 @@
         <xs:attribute name="interpolation-mode" type="tns:InterpolationModeEnum" default="default"/>
         <xs:attribute name="error-image" type="xs:string"/>
         <xs:attribute name="loading-image" type="xs:string"/>
-        <xs:attribute name="border-style" type="tns:BorderStyleEnum" default="none"/>
-        <xs:attribute name="cursor-hand" type="xs:boolean" default="false"/>
-        <xs:attribute name="allow-drop" type="xs:boolean" default="false"/>
-        <xs:attribute name="cache-image" type="xs:boolean" default="true"/>
-        <xs:attribute name="async-load" type="xs:boolean" default="false"/>
-        <xs:attribute name="rotation" type="tns:RotationEnum" default="none"/>
-        <xs:attribute name="flip" type="tns:FlipEnum" default="none"/>
-        <xs:attribute name="opacity" type="xs:double" default="1.0"/>
-        <xs:attribute name="grayscale" type="xs:boolean" default="false"/>
-        <xs:attribute name="alt-text" type="xs:string"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
@@ -127,19 +119,16 @@
   <!-- INPUT CONTROLS -->
   
   <!-- TextBox Control Type -->
-  <xs:complexType name="TextBoxType">
+  <xs:complexType name="TextBoxType" mixed="true">
     <xs:complexContent>
       <xs:extension base="tns:BasicControlInstanceType">
         <xs:attribute name="max-length" type="xs:int" default="32767"/>
+        <xs:attribute name="password-char" type="xs:string"/>
         <xs:attribute name="read-only" type="xs:boolean" default="false"/>
         <xs:attribute name="multiline" type="xs:boolean" default="false"/>
-        <xs:attribute name="password-char" type="xs:string"/>
-        <xs:attribute name="placeholder-text" type="xs:string"/>
-        <xs:attribute name="text-align" type="tns:TextAlignEnum" default="left"/>
-        <xs:attribute name="accepts-return" type="xs:boolean" default="false"/>
-        <xs:attribute name="accepts-tab" type="xs:boolean" default="false"/>
         <xs:attribute name="word-wrap" type="xs:boolean" default="true"/>
-        <xs:attribute name="scroll-bars" type="tns:ScrollBarsEnum" default="none"/>
+        <xs:attribute name="accept-returns" type="xs:boolean" default="false"/>
+        <xs:attribute name="accept-tabs" type="xs:boolean" default="false"/>
         <xs:attribute name="auto-complete-mode" type="tns:AutoCompleteModeEnum" default="none"/>
         <xs:attribute name="auto-complete-source" type="xs:string"/>
       </xs:extension>
@@ -167,7 +156,7 @@
   <!-- ACTION CONTROLS -->
   
   <!-- Button Control Type -->
-  <xs:complexType name="ButtonType">
+  <xs:complexType name="ButtonType" mixed="true">
     <xs:complexContent>
       <xs:extension base="tns:BasicControlInstanceType">
         <xs:attribute name="type" type="tns:ButtonTypeEnum" default="text"/>
@@ -186,7 +175,7 @@
   <!-- CONTAINER CONTROLS -->
   
   <!-- Panel Control Type -->
-  <xs:complexType name="PanelType">
+  <xs:complexType name="PanelType" mixed="true">
     <xs:complexContent>
       <xs:extension base="tns:BasicControlInstanceType">
         <xs:attribute name="border-style" type="tns:BorderStyleEnum" default="none"/>
@@ -200,7 +189,7 @@
   </xs:complexType>
 
   <!-- PopupPanel Control Type -->
-  <xs:complexType name="PopupPanelType">
+  <xs:complexType name="PopupPanelType" mixed="true">
     <xs:complexContent>
       <xs:extension base="tns:PanelType">
         <xs:attribute name="popup-mode" type="tns:PopupModeEnum" default="modeless"/>
@@ -241,8 +230,8 @@
     <xs:complexContent>
       <xs:extension base="tns:BasicControlInstanceType">
         <xs:sequence>
-          <xs:element name="columns" type="tns:ColumnsType" minOccurs="0"/>
           <xs:element name="items" type="tns:ListViewItemsType" minOccurs="0"/>
+          <xs:element name="columns" type="tns:ColumnsType" minOccurs="0"/>
         </xs:sequence>
         <xs:attribute name="view-mode" type="tns:ListViewModeEnum" default="details"/>
         <xs:attribute name="multi-select" type="xs:boolean" default="false"/>
@@ -251,10 +240,54 @@
         <xs:attribute name="header-style" type="tns:HeaderStyleEnum" default="clickable"/>
         <xs:attribute name="sorting" type="tns:SortingEnum" default="none"/>
         <xs:attribute name="allow-column-reorder" type="xs:boolean" default="false"/>
+        <xs:attribute name="scrollable" type="xs:boolean" default="true"/>
+        <xs:attribute name="border-style" type="tns:BorderStyleEnum" default="single"/>
+        <xs:attribute name="auto-arrange" type="xs:boolean" default="true"/>
+        <xs:attribute name="label-edit" type="xs:boolean" default="false"/>
+        <xs:attribute name="label-wrap" type="xs:boolean" default="false"/>
+        <xs:attribute name="hide-selection" type="xs:boolean" default="true"/>
+        <xs:attribute name="hover-selection" type="xs:boolean" default="false"/>
+        <xs:attribute name="hot-tracking" type="xs:boolean" default="false"/>
+        <xs:attribute name="virtual-mode" type="xs:boolean" default="false"/>
+        <xs:attribute name="virtual-list-size" type="xs:int" default="0"/>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+
+  <!-- Gallery Control Type -->
+  <xs:complexType name="GalleryType" mixed="true">
+    <xs:complexContent>
+      <xs:extension base="tns:BasicControlInstanceType">
+        <xs:sequence>
+          <xs:element name="items" type="tns:GalleryItemsType" minOccurs="0"/>
+          <xs:element name="box-template" type="tns:BoxTemplateType" minOccurs="1"/>
+        </xs:sequence>
+        <!-- ListView inherited attributes -->
+        <xs:attribute name="view-mode" type="tns:GalleryViewModeEnum" default="gallery"/>
+        <xs:attribute name="multi-select" type="xs:boolean" default="false"/>
+        <xs:attribute name="full-row-select" type="xs:boolean" default="false"/>
+        <xs:attribute name="grid-lines" type="xs:boolean" default="false"/>
+        <xs:attribute name="header-style" type="tns:HeaderStyleEnum" default="none"/>
+        <xs:attribute name="sorting" type="tns:SortingEnum" default="none"/>
+        <xs:attribute name="allow-column-reorder" type="xs:boolean" default="false"/>
+        <xs:attribute name="scrollable" type="xs:boolean" default="true"/>
+        <xs:attribute name="border-style" type="tns:BorderStyleEnum" default="single"/>
+        <xs:attribute name="auto-arrange" type="xs:boolean" default="true"/>
+        <xs:attribute name="label-edit" type="xs:boolean" default="false"/>
+        <xs:attribute name="label-wrap" type="xs:boolean" default="false"/>
+        <xs:attribute name="hide-selection" type="xs:boolean" default="true"/>
         <xs:attribute name="hover-selection" type="xs:boolean" default="false"/>
         <xs:attribute name="hot-tracking" type="xs:boolean" default="false"/>
         <xs:attribute name="virtual-mode" type="xs:boolean" default="false"/>
         <xs:attribute name="virtual-list-size" type="xs:int" default="0"/>
+        
+        <!-- Gallery-specific attributes -->
+        <xs:attribute name="image-width" type="xs:int" default="64"/>
+        <xs:attribute name="image-height" type="xs:int" default="64"/>
+        <xs:attribute name="box-width" type="xs:int" default="120"/>
+        <xs:attribute name="box-height" type="xs:int" default="120"/>
+        <xs:attribute name="paging-enabled" type="xs:boolean" default="false"/>
+        <xs:attribute name="paging-page-size" type="xs:int" default="50"/>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>
@@ -324,6 +357,97 @@
     <xs:attribute name="tag" type="xs:string"/>
   </xs:complexType>
 
+  <!-- GalleryItem Type -->
+  <xs:complexType name="GalleryItemType">
+    <xs:sequence>
+      <xs:element name="custom-properties" minOccurs="0">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="property" type="tns:CustomPropertyType" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="data-fields" minOccurs="0">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="field" type="tns:DataFieldType" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="text" type="xs:string" use="required"/>
+    <xs:attribute name="value" type="xs:string"/>
+    <xs:attribute name="selected" type="xs:boolean" default="false"/>
+    <xs:attribute name="checked" type="xs:boolean" default="false"/>
+    <xs:attribute name="focused" type="xs:boolean" default="false"/>
+    <xs:attribute name="image" type="xs:string"/>
+    <xs:attribute name="image-index" type="xs:int" default="-1"/>
+    <xs:attribute name="image-key" type="xs:string"/>
+    <xs:attribute name="thumbnail" type="xs:string"/>
+    <xs:attribute name="group" type="xs:string"/>
+    <xs:attribute name="tooltip" type="xs:string"/>
+    <xs:attribute name="tag" type="xs:string"/>
+    <xs:attribute name="box-data" type="xs:string"/>
+    <xs:attribute name="template-override" type="xs:string"/>
+  </xs:complexType>
+
+  <!-- Box Template Type -->
+  <xs:complexType name="BoxTemplateType">
+    <xs:sequence>
+      <xs:element name="template-elements">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="element" type="tns:TemplateElementType" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="width" type="xs:int" default="120"/>
+    <xs:attribute name="height" type="xs:int" default="120"/>
+    <xs:attribute name="background-color" type="xs:string" default="transparent"/>
+    <xs:attribute name="border-color" type="xs:string" default="gray"/>
+    <xs:attribute name="border-style" type="tns:BorderStyleEnum" default="solid"/>
+    <xs:attribute name="border-width" type="xs:int" default="1"/>
+    <xs:attribute name="padding" type="xs:string" default="4,4,4,4"/>
+    <xs:attribute name="margin" type="xs:string" default="2,2,2,2"/>
+  </xs:complexType>
+
+  <!-- Template Element Type -->
+  <xs:complexType name="TemplateElementType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="type" type="tns:TemplateElementTypeEnum" use="required"/>
+    <xs:attribute name="x" type="xs:int" default="0"/>
+    <xs:attribute name="y" type="xs:int" default="0"/>
+    <xs:attribute name="width" type="xs:string" default="auto"/>
+    <xs:attribute name="height" type="xs:string" default="auto"/>
+    <xs:attribute name="data-binding" type="xs:string"/>
+    <xs:attribute name="format-string" type="xs:string"/>
+    <xs:attribute name="font-family" type="xs:string" default="system"/>
+    <xs:attribute name="font-size" type="xs:int" default="12"/>
+    <xs:attribute name="font-style" type="tns:FontStyleEnum" default="normal"/>
+    <xs:attribute name="foreground-color" type="xs:string" default="black"/>
+    <xs:attribute name="text-align" type="tns:TextAlignEnum" default="left"/>
+    <xs:attribute name="vertical-align" type="tns:VerticalAlignEnum" default="top"/>
+    <xs:attribute name="image-size-mode" type="tns:ImageSizeModeEnum" default="normal"/>
+    <xs:attribute name="anchor" type="tns:AnchorEnum" default="none"/>
+  </xs:complexType>
+
+  <!-- Custom Property Type -->
+  <xs:complexType name="CustomPropertyType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="value" type="xs:string" use="required"/>
+    <xs:attribute name="data-type" type="tns:DataTypeEnum" default="text"/>
+  </xs:complexType>
+
+  <!-- Data Field Type -->
+  <xs:complexType name="DataFieldType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="value" type="xs:string" use="required"/>
+    <xs:attribute name="display-name" type="xs:string"/>
+    <xs:attribute name="format" type="xs:string"/>
+  </xs:complexType>
+
   <!-- ColumnItem Type -->
   <xs:complexType name="ColumnItemType">
     <xs:attribute name="name" type="xs:string" use="required"/>
@@ -403,6 +527,13 @@
     </xs:sequence>
   </xs:complexType>
 
+  <!-- Gallery Items -->
+  <xs:complexType name="GalleryItemsType">
+    <xs:sequence>
+      <xs:element name="GalleryItem" type="tns:GalleryItemType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
   <!-- Columns -->
   <xs:complexType name="ColumnsType">
     <xs:sequence>
@@ -427,7 +558,7 @@
       <xs:enumeration value="right"/>
       <xs:enumeration value="top"/>
       <xs:enumeration value="bottom"/>
-	  <xs:enumeration value="fill"/>
+      <xs:enumeration value="fill"/>
     </xs:restriction>
   </xs:simpleType>
 
@@ -483,6 +614,20 @@
     </xs:restriction>
   </xs:simpleType>
 
+  <!-- Border Style Enumeration -->
+  <xs:simpleType name="BorderStyleEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="none"/>
+      <xs:enumeration value="single"/>
+      <xs:enumeration value="raised"/>
+      <xs:enumeration value="sunken"/>
+      <xs:enumeration value="double"/>
+      <xs:enumeration value="solid"/>
+      <xs:enumeration value="dashed"/>
+      <xs:enumeration value="dotted"/>
+    </xs:restriction>
+  </xs:simpleType>
+
   <!-- Separator Specific Enumerations -->
   <xs:simpleType name="LineStyleEnum">
     <xs:restriction base="xs:string">
@@ -515,6 +660,8 @@
       <xs:enumeration value="auto-size"/>
       <xs:enumeration value="center-image"/>
       <xs:enumeration value="zoom"/>
+      <xs:enumeration value="stretch"/>
+      <xs:enumeration value="center"/>
     </xs:restriction>
   </xs:simpleType>
 
@@ -523,6 +670,7 @@
       <xs:enumeration value="ignore"/>
       <xs:enumeration value="keep"/>
       <xs:enumeration value="keep-by-expanding"/>
+      <xs:enumeration value="fit"/>
     </xs:restriction>
   </xs:simpleType>
 
@@ -537,44 +685,7 @@
     </xs:restriction>
   </xs:simpleType>
 
-  <xs:simpleType name="RotationEnum">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="none"/>
-      <xs:enumeration value="rotate90"/>
-      <xs:enumeration value="rotate180"/>
-      <xs:enumeration value="rotate270"/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name="FlipEnum">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="none"/>
-      <xs:enumeration value="horizontal"/>
-      <xs:enumeration value="vertical"/>
-      <xs:enumeration value="both"/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <!-- Other Control Specific Enumerations -->
-  <xs:simpleType name="BorderStyleEnum">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="none"/>
-      <xs:enumeration value="single"/>
-      <xs:enumeration value="raised"/>
-      <xs:enumeration value="sunken"/>
-      <xs:enumeration value="double"/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name="ScrollBarsEnum">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="none"/>
-      <xs:enumeration value="horizontal"/>
-      <xs:enumeration value="vertical"/>
-      <xs:enumeration value="both"/>
-    </xs:restriction>
-  </xs:simpleType>
-
+  <!-- TextBox Specific Enumerations -->
   <xs:simpleType name="AutoCompleteModeEnum">
     <xs:restriction base="xs:string">
       <xs:enumeration value="none"/>
@@ -584,6 +695,7 @@
     </xs:restriction>
   </xs:simpleType>
 
+  <!-- ComboBox Specific Enumerations -->
   <xs:simpleType name="DropdownStyleEnum">
     <xs:restriction base="xs:string">
       <xs:enumeration value="dropdown"/>
@@ -592,6 +704,7 @@
     </xs:restriction>
   </xs:simpleType>
 
+  <!-- Button Specific Enumerations -->
   <xs:simpleType name="ButtonTypeEnum">
     <xs:restriction base="xs:string">
       <xs:enumeration value="text"/>
@@ -629,6 +742,7 @@
     </xs:restriction>
   </xs:simpleType>
 
+  <!-- Panel Specific Enumerations -->
   <xs:simpleType name="LayoutTypeEnum">
     <xs:restriction base="xs:string">
       <xs:enumeration value="absolute"/>
@@ -647,6 +761,7 @@
     </xs:restriction>
   </xs:simpleType>
 
+  <!-- PopupPanel Specific Enumerations -->
   <xs:simpleType name="PopupModeEnum">
     <xs:restriction base="xs:string">
       <xs:enumeration value="modal"/>
@@ -655,6 +770,7 @@
     </xs:restriction>
   </xs:simpleType>
 
+  <!-- ListView Specific Enumerations -->
   <xs:simpleType name="ListViewModeEnum">
     <xs:restriction base="xs:string">
       <xs:enumeration value="details"/>
@@ -665,6 +781,28 @@
     </xs:restriction>
   </xs:simpleType>
 
+  <!-- Gallery Specific Enumerations -->
+  <xs:simpleType name="GalleryViewModeEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="details"/>
+      <xs:enumeration value="list"/>
+      <xs:enumeration value="large-icons"/>
+      <xs:enumeration value="small-icons"/>
+      <xs:enumeration value="tiles"/>
+      <xs:enumeration value="gallery"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:simpleType name="TemplateElementTypeEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="image"/>
+      <xs:enumeration value="text"/>
+      <xs:enumeration value="label"/>
+      <xs:enumeration value="custom"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <!-- Common List Control Enumerations -->
   <xs:simpleType name="HeaderStyleEnum">
     <xs:restriction base="xs:string">
       <xs:enumeration value="none"/>
@@ -681,6 +819,7 @@
     </xs:restriction>
   </xs:simpleType>
 
+  <!-- Menu Specific Enumerations -->
   <xs:simpleType name="MergeTypeEnum">
     <xs:restriction base="xs:string">
       <xs:enumeration value="add"/>
@@ -690,6 +829,7 @@
     </xs:restriction>
   </xs:simpleType>
 
+  <!-- Data Type Enumeration -->
   <xs:simpleType name="DataTypeEnum">
     <xs:restriction base="xs:string">
       <xs:enumeration value="text"/>
@@ -697,6 +837,7 @@
       <xs:enumeration value="date"/>
       <xs:enumeration value="boolean"/>
       <xs:enumeration value="image"/>
+      <xs:enumeration value="object"/>
     </xs:restriction>
   </xs:simpleType>