ソースを参照

v.1.2. add window-include for support include, optimize xsd

Dalibor Votruba 11 ヶ月 前
コミット
20acb5a402

+ 1 - 1
UILayoutDefinitionFormat/Samples/sample-minimal.xml

@@ -2,7 +2,7 @@
 <!-- Minimal UI Layout Definition Format Sample -->
 <ui-layout-def xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="ui-layout-definition ui-layout-def.xsd"
-               version="1.1">
+               version="1.2">
   
   <!-- Basic pattern definitions (required) -->
   <patterns>

+ 1 - 1
UILayoutDefinitionFormat/Samples/sample.xml

@@ -2,7 +2,7 @@
 <!-- UI Layout Definition Format with Control Constraints and Views (v1.1) -->
 <ui-layout-def xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="ui-layout-definition ui-layout-def.xsd"
-               version="1.1">
+               version="1.2">
   
   <!-- Validation rules for control usage including includes -->
   <validation-rules>

+ 276 - 422
UILayoutDefinitionFormat/readme.md

@@ -1,58 +1,103 @@
 # UI Layout Definition Format
 
-**Version:** 1.1  
-**Documentation Version:** 1.1  
+**Version:** 1.2  
+**Documentation Version:** 1.2  
 **Author:** Dalibor Votruba  
 **URL:** [quadarax.com/ui-layout-def](https://quadarax.com/ui-layout-def)
 
-A comprehensive XML-based format for describing user interface layouts with inheritance, pattern definitions, view organization, and platform-specific extensions. This format enables cross-platform UI generation with strict validation and modular component libraries.
+A comprehensive XML-based format for describing user interface layouts with inheritance, pattern definitions, view organization, external includes, and platform-specific extensions. This format enables cross-platform UI generation with strict validation and modular component libraries.
 
 ## Table of Contents
 
 - [Overview](#overview)
+- [What's New in v1.2](#whats-new-in-v12)
 - [Core Concepts](#core-concepts)
 - [Document Structure](#document-structure)
-- [View Definitions (NEW)](#view-definitions)
+- [View Definitions](#view-definitions)
 - [Pattern Definitions](#pattern-definitions)
-- [Control Definitions](#control-definitions)
 - [Wireframe Inheritance](#wireframe-inheritance)
 - [Window Definitions](#window-definitions)
-- [Validation System](#validation-system)
 - [External Includes](#external-includes)
+- [Window Includes (NEW)](#window-includes-new)
+- [Validation System](#validation-system)
 - [Examples](#examples)
 - [Best Practices](#best-practices)
 - [Platform Support](#platform-support)
+- [Migration Guide](#migration-guide)
 
 ## Overview
 
-The UI Layout Definition Format provides a standardized way to define user interfaces that can be translated to various platforms (Windows Forms, WPF, Qt, Web, Mobile). It emphasizes:
+The UI Layout Definition Format provides a standardized way to define user interfaces that can be translated to various platforms (Windows Forms, WPF, Avalonia, Qt, Web, Mobile). It emphasizes:
 
 - **View-Based Organization**: Logical grouping of related UI components by business function
 - **Separation of Concerns**: Pattern definitions separate from usage
 - **Inheritance**: Base wireframes and views with specific overrides
+- **External Includes**: Modular design with external pattern, view, validation, and window files
 - **Validation**: Strict constraints ensure consistent, valid UIs
-- **Modularity**: External pattern, view, and validation includes
 - **Cross-Platform**: Platform-specific control libraries
 - **MVVM Support**: Direct mapping to view models and business logic
 
+## What's New in v1.2
+
+### Major Enhancements
+
+1. **Window Includes Support**
+   - Separate window definitions into external files
+   - Improved organization for large applications
+   - Better team collaboration capabilities
+
+2. **Enhanced Schema Validation**
+   - More comprehensive XSD schema
+   - Better error reporting and validation
+   - Support for all platform-specific controls
+
+3. **Expanded Platform Support**
+   - Full Avalonia UI control library
+   - Enhanced WinForms control definitions
+   - Web and mobile control patterns
+
+4. **Advanced View Features**
+   - Enhanced communication patterns
+   - Workflow support for process-driven views
+   - Module view organization
+   - Main navigation integration
+
+5. **Improved Control Library**
+   - Abstract control definitions
+   - Better inheritance patterns
+   - Platform-specific specializations
+
+### Breaking Changes from v1.1
+
+- Enhanced schema validation may require updates to existing documents
+- Some control attributes have been refined for better platform compatibility
+- Window include structure requires specific file organization
+
 ## Core Concepts
 
-### 1. View-First Design (NEW in v1.1)
+### 1. View-First Design
 Views represent logical business functions (ProductView, OrderView) that group related windows and define shared data context and behaviors.
 
 ### 2. Patterns-First Design
 All controls and structures must be defined in the `<patterns>` section before use in windows.
 
-### 3. Inheritance Hierarchy
+### 3. External Includes
+Modular design allows splitting definitions across multiple files:
+- Pattern includes for control libraries
+- View includes for business logic organization
+- Validation includes for rule sets
+- Window includes for UI definitions
+
+### 4. Inheritance Hierarchy
 - Views can inherit from other views
 - Controls can inherit from other controls
 - Windows can inherit from wireframe layouts
 - Attributes can be overridden at any level
 
-### 4. Slot-Based Composition
+### 5. Slot-Based Composition
 Wireframes use slots as placeholders that windows can fill with specific content.
 
-### 5. Constraint Validation
+### 6. Constraint Validation
 Comprehensive validation rules ensure UI consistency and platform compliance.
 
 ## Document Structure
@@ -60,7 +105,8 @@ Comprehensive validation rules ensure UI consistency and platform compliance.
 ```xml
 <?xml version="1.0" encoding="UTF-8"?>
 <ui-layout-def xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-               xsi:schemaLocation="ui-layout-definition ui-layout-def.xsd">
+               xsi:schemaLocation="ui-layout-definition ui-layout-def.xsd"
+               version="1.2">
   
   <!-- Optional: Validation rules with external includes -->
   <validation-rules>
@@ -76,13 +122,18 @@ Comprehensive validation rules ensure UI consistency and platform compliance.
     <wireframe name="...">...</wireframe>
   </patterns>
   
-  <!-- NEW: View definitions with external includes -->
+  <!-- View definitions with external includes -->
   <views>
     <view-include src="..." important="true/false" />
     <view name="..." type="..." category="..." inherits="...">...</view>
   </views>
   
-  <!-- Required: One or more window definitions -->
+  <!-- NEW: Window includes -->
+  <window-includes>
+    <window-include src="..." important="true/false" />
+  </window-includes>
+  
+  <!-- Window definitions (can be in external files) -->
   <window name="..." title="..." wireframe="..." view="...">
     <!-- Window content -->
   </window>
@@ -106,7 +157,7 @@ Views are logical containers that group related windows, dialogs, and UI compone
 
 ```xml
 <view name="ProductView" type="business-entity" category="core" inherits="BaseEntityView">
-  <description>Product management functionality including listing, editing, and details</description>
+  <description>Product management functionality</description>
   
   <!-- View metadata for code generation -->
   <metadata>
@@ -119,7 +170,6 @@ Views are logical containers that group related windows, dialogs, and UI compone
   <!-- View dependencies -->
   <dependencies>
     <view-ref name="CategoryView" relationship="lookup" required="false" />
-    <view-ref name="SupplierView" relationship="reference" required="false" />
     <shared-component name="FileUploadComponent" required="true" />
   </dependencies>
   
@@ -127,29 +177,29 @@ Views are logical containers that group related windows, dialogs, and UI compone
   <data-context>
     <property name="currentProduct" type="Product" scope="view" />
     <property name="productList" type="ProductList" scope="view" />
-    <property name="selectedCategory" type="Category" scope="shared" />
   </data-context>
   
   <!-- Window associations -->
   <windows>
     <window-ref name="ProductListWindow" role="main" default="true" />
     <window-ref name="ProductEditDialog" role="editor" modal="true" />
-    <window-ref name="ProductDetailsWindow" role="viewer" />
   </windows>
   
   <!-- View-level navigation -->
   <navigation>
     <action name="show-list" target="ProductListWindow" />
     <action name="edit-product" target="ProductEditDialog" context="currentProduct" />
-    <action name="view-details" target="ProductDetailsWindow" context="currentProduct" />
   </navigation>
   
-  <!-- Shared behaviors -->
-  <behaviors>
-    <behavior name="refresh-data" scope="view" />
-    <behavior name="validate-product" scope="view" />
-    <behavior name="save-changes" scope="view" />
-  </behaviors>
+  <!-- Communication patterns -->
+  <communication>
+    <publishes>
+      <event name="product-saved" data="product-id" />
+    </publishes>
+    <subscribes>
+      <event name="category-changed" source="CategoryView" handler="refresh-list" />
+    </subscribes>
+  </communication>
 </view>
 ```
 
@@ -163,6 +213,7 @@ Views are logical containers that group related windows, dialogs, and UI compone
 - `wizard` - Setup wizards, guided processes
 - `composite` - Views composed of multiple sub-views
 - `module` - Application modules containing multiple views
+- `base` - Base views for inheritance
 
 **Categories:**
 - `core` - Essential business functionality
@@ -170,97 +221,35 @@ Views are logical containers that group related windows, dialogs, and UI compone
 - `reporting` - Reports and analytics
 - `system` - System-level functionality
 - `framework` - Base views for inheritance
+- `business` - Business-specific functionality
 
-### View Inheritance
+### Advanced View Features
 
+#### Workflow Support
 ```xml
-<!-- Base entity view -->
-<view name="BaseEntityView" type="base" category="framework">
-  <windows>
-    <window-ref name="BaseListWindow" role="main" />
-    <window-ref name="BaseEditDialog" role="editor" />
-  </windows>
-  
-  <navigation>
-    <action name="show-list" target="BaseListWindow" />
-    <action name="edit-entity" target="BaseEditDialog" />
-  </navigation>
-  
-  <behaviors>
-    <behavior name="refresh-data" />
-    <behavior name="save-changes" />
-  </behaviors>
-</view>
-
-<!-- Inherited view -->
-<view name="ProductView" inherits="BaseEntityView">
-  <!-- Inherits all windows, navigation, and behaviors from BaseEntityView -->
-  <!-- Can override or extend with additional functionality -->
-  
-  <windows>
-    <!-- Additional product-specific windows -->
-    <window-ref name="ProductCatalogWindow" role="catalog" />
-  </windows>
-  
-  <navigation>
-    <!-- Override base action -->
-    <action name="edit-entity" target="ProductEditDialog" context="currentProduct" />
-    <!-- Add new action -->
-    <action name="view-catalog" target="ProductCatalogWindow" />
-  </navigation>
+<view name="OrderProcessingView" type="process-flow" category="core">
+  <workflow>
+    <step name="order-entry" window="OrderEntryWindow" next="payment" />
+    <step name="payment" window="PaymentWindow" next="confirmation" previous="order-entry" />
+    <step name="confirmation" window="ConfirmationWindow" previous="payment" />
+  </workflow>
 </view>
 ```
 
-### View Dependencies and Relationships
-
+#### Module Organization
 ```xml
-<dependencies>
-  <!-- Lookup relationship - uses other view for data selection -->
-  <view-ref name="CategoryView" relationship="lookup" required="false">
-    <interaction type="select-category" returns="category-id" />
-  </view-ref>
-  
-  <!-- Master-detail relationship -->
-  <view-ref name="OrderItemView" relationship="detail" required="true">
-    <interaction type="manage-items" context="current-order" />
-  </view-ref>
-  
-  <!-- Reference relationship - shows related data -->
-  <view-ref name="CustomerView" relationship="reference" required="false">
-    <interaction type="view-customer" context="customer-id" />
-  </view-ref>
-  
-  <!-- Shared component dependency -->
-  <shared-component name="AddressComponent" required="true" />
-  <shared-component name="NotificationService" required="true" />
-</dependencies>
-```
-
-### Composite Views
-
-```xml
-<view name="OrderManagementView" type="composite" category="core">
-  <description>Complete order management including orders, items, and customer details</description>
-  
-  <!-- Composed views -->
-  <composed-views>
-    <view-ref name="OrderView" role="primary" layout-slot="main-content" />
-    <view-ref name="OrderItemView" role="detail" layout-slot="items-panel" />
-    <view-ref name="CustomerView" role="reference" layout-slot="customer-panel" />
-  </composed-views>
-  
-  <!-- Composite layout -->
-  <layout wireframe="CompositeViewLayout">
-    <slot name="main-content" view="OrderView" />
-    <slot name="items-panel" view="OrderItemView" />
-    <slot name="customer-panel" view="CustomerView" />
-  </layout>
-  
-  <!-- Cross-view coordination -->
-  <coordination>
-    <rule when="OrderView.order-selected" then="OrderItemView.load-items" />
-    <rule when="OrderView.customer-changed" then="CustomerView.load-customer" />
-  </coordination>
+<view name="ECommerceModule" type="module" category="business">
+  <module-views>
+    <view-ref name="ProductView" />
+    <view-ref name="OrderView" />
+    <view-ref name="CustomerView" />
+  </module-views>
+  
+  <main-navigation>
+    <nav-item text="Products" view="ProductView" action="show-list" />
+    <nav-item text="Orders" view="OrderView" action="show-list" />
+    <nav-item text="Customers" view="CustomerView" action="show-list" />
+  </main-navigation>
 </view>
 ```
 
@@ -288,159 +277,125 @@ Views are logical containers that group related windows, dialogs, and UI compone
 </control>
 ```
 
-#### Control Properties
-
-- **name**: Unique identifier for the control type
-- **type**: Control category (action, input, display, container, data, navigation)
-- **category**: Platform grouping (basic, windows-specific, web-specific, etc.)
-- **inherits**: Optional parent control to inherit from
-
-#### Constraints
-
-- **allowed-parents**: List of controls that can contain this control
-- **allowed-children**: List of controls this control can contain
-- **container**: Boolean indicating if control can contain children
-- **max-children**: Maximum number of child controls allowed
-- **requires-structure**: Required structural elements
+### Platform-Specific Controls
 
-#### Attributes
+The format supports platform-specific control libraries:
 
-- **name**: Attribute identifier
-- **type**: Data type (string, int, bool, enum, color, date, etc.)
-- **default**: Default value
-- **required**: Whether attribute must be specified
-- **min/max**: Value constraints for numeric types
-- **values**: Allowed values for enum types
-
-### Structure Definition
+#### Avalonia Controls
+```xml
+<control name="AvaloniaButton" type="action" category="avalonia-specific" inherits="Button">
+  <attributes>
+    <attribute name="click-mode" type="enum" values="Release,Press,Hover" default="Release" />
+    <attribute name="is-default" type="bool" default="false" />
+    <attribute name="command" type="string" default="" />
+  </attributes>
+</control>
+```
 
+#### WinForms Controls
 ```xml
-<structure name="FormField" type="pattern" category="composite">
+<control name="DataGridView" type="data" category="winforms-data">
   <constraints>
-    <allowed-parents>Panel</allowed-parents>
-    <required-slots>input</required-slots>
+    <allowed-parents>Panel,GroupBox,TabPage,Form</allowed-parents>
+    <requires-structure>columns</requires-structure>
   </constraints>
   
   <attributes>
-    <attribute name="label-text" type="string" required="true" />
-    <attribute name="required" type="bool" default="false" />
+    <attribute name="allowusertoaddrows" type="bool" default="true" />
+    <attribute name="selectionmode" type="enum" values="CellSelect,FullRowSelect" default="RowHeaderSelect" />
   </attributes>
-  
-  <template>
-    <Panel name="fieldContainer">
-      <Label name="fieldLabel" text="{label-text}" />
-      <slot name="input" allowed-controls="TextBox,ComboBox" required="true" />
-      <Label name="validationLabel" visible="false" color="#ff0000" />
-    </Panel>
-  </template>
-</structure>
+</control>
 ```
 
-### Wireframe Definition
+## External Includes
+
+### Pattern Includes
 
 ```xml
-<wireframe name="StandardAppLayout" type="base-layout">
-  <description>Standard application layout with header, sidebar, content, footer</description>
-  <template>
-    <Panel name="rootContainer">
-      <Panel name="headerPanel" height="60">
-        <slot name="header-content" default="true">
-          <Label name="appTitle" text="Application Title" />
-        </slot>
-      </Panel>
-      
-      <Panel name="mainContainer" orientation="horizontal">
-        <Panel name="sidebarPanel" width="250">
-          <slot name="sidebar-content" />
-        </Panel>
-        <Panel name="contentPanel" fill="true">
-          <slot name="main-content" required="true" />
-        </Panel>
-      </Panel>
-      
-      <Panel name="footerPanel" height="30">
-        <slot name="footer-content" default="true">
-          <Label name="statusLabel" text="Ready" />
-        </slot>
-      </Panel>
-    </Panel>
-  </template>
-</wireframe>
+<patterns>
+  <pattern-include src="abstract-controls.xml" important="true" />
+  <pattern-include src="winform-controls.xml" important="true" />
+  <pattern-include src="avalonia-controls.xml" important="false" />
+  <pattern-include src="web-controls.xml" important="false" />
+  <!-- Local pattern definitions -->
+</patterns>
 ```
 
-## Wireframe Inheritance
+### View Includes
 
-Windows can inherit from wireframe layouts and override specific slots:
+```xml
+<views>
+  <view-include src="business-views.xml" important="true" />
+  <view-include src="admin-views.xml" important="false" />
+  <!-- Local view definitions -->
+</views>
+```
+
+### Validation Includes
 
 ```xml
-<window name="MainWindow" title="Main Application" wireframe="StandardAppLayout" view="MainView">
-  <attributes>
-    <attribute name="width" value="800" />
-    <attribute name="height" value="600" />
-  </attributes>
+<validation-rules>
+  <validation-include src="base-validation.xml" important="true" />
+  <validation-include src="view-validation.xml" important="true" />
+  <validation-include src="accessibility-rules.xml" important="false" />
+  <!-- Local validation rules -->
+</validation-rules>
+```
+
+## Window Includes (NEW)
+
+Version 1.2 introduces the ability to organize windows in separate files for better project structure and team collaboration.
+
+### Main Document Structure
+```xml
+<ui-layout-def version="1.2">
+  <patterns>
+    <!-- Pattern definitions -->
+  </patterns>
   
-  <view-properties>
-    <role>main</role>
-    <default>true</default>
-    <data-context-binding>mainData</data-context-binding>
-  </view-properties>
+  <views>
+    <!-- View definitions -->
+  </views>
   
-  <slot-overrides>
-    <slot name="header-content">
-      <Label name="appTitle" text="My Application" />
-      <Button name="settingsButton" text="Settings" />
-    </slot>
-    
-    <slot name="main-content">
-      <Panel name="dashboardPanel">
-        <!-- Main content here -->
-      </Panel>
-    </slot>
-  </slot-overrides>
-</window>
+  <window-includes>
+    <window-include src="main-windows.xml" important="true" />
+    <window-include src="dialog-windows.xml" important="true" />
+    <window-include src="admin-windows.xml" important="false" />
+  </window-includes>
+</ui-layout-def>
 ```
 
-## Window Definitions
-
+### Window Include File (main-windows.xml)
 ```xml
-<window name="WindowName" title="Window Title" wireframe="OptionalWireframe" view="AssociatedView">
-  <attributes>
-    <attribute name="width" value="800" />
-    <attribute name="height" value="600" />
-    <attribute name="resizable" value="true" />
-    <attribute name="modal" value="false" />
-  </attributes>
+<?xml version="1.0" encoding="UTF-8"?>
+<windows xmlns="ui-layout-definition">
   
-  <!-- NEW: View properties -->
-  <view-properties>
-    <role>main</role>
-    <default>true</default>
-    <modal>false</modal>
-    <data-context-binding>entityData</data-context-binding>
-    <parent-window>ParentWindow</parent-window>
-  </view-properties>
+  <window name="MainWindow" title="Main Application" view="MainView">
+    <!-- Window definition -->
+  </window>
   
-  <!-- For wireframe-based windows -->
-  <slot-overrides>
-    <slot name="content">
-      <!-- Slot content -->
-    </slot>
-  </slot-overrides>
+  <window name="ProductListWindow" title="Products" view="ProductView">
+    <!-- Window definition -->
+  </window>
   
-  <!-- For direct layout windows -->
-  <Panel name="mainPanel">
-    <!-- Direct content -->
-  </Panel>
-</window>
+</windows>
 ```
 
+### Include Processing Rules
+
+- **important="true"**: Must be found and loaded, build fails if missing
+- **important="false"**: Optional, warnings only if missing
+- Includes are processed in order before local definitions
+- Local definitions can override included definitions
+- Naming conflicts resolved by last-loaded-wins principle
+
 ## Validation System
 
-### Enhanced Validation Rules for Views
+### Enhanced Validation Rules
 
 ```xml
 <validation-rules>
-  <!-- View-specific validation rules -->
+  <!-- View-specific validation -->
   <rule name="view-window-association">
     <description>All windows must be associated with a view</description>
     <constraint>Every window must be referenced by at least one view</constraint>
@@ -451,176 +406,85 @@ Windows can inherit from wireframe layouts and override specific slots:
     <constraint>Referenced views in dependencies must be defined</constraint>
   </rule>
   
-  <rule name="view-inheritance-validation">
-    <description>View inheritance must be valid</description>
-    <constraint>Inherited views must be defined and compatible</constraint>
-  </rule>
-  
-  <rule name="data-context-consistency">
-    <description>Data context properties must be consistently typed</description>
-    <constraint>Shared properties across views must have compatible types</constraint>
-  </rule>
-  
-  <!-- Existing validation rules -->
+  <!-- Control validation -->
   <rule name="control-definition-required">
     <description>All controls used in windows must be defined in patterns</description>
-    <constraint>Every control element must reference a defined control or structure pattern</constraint>
+    <constraint>Every control element must reference a defined pattern</constraint>
+  </rule>
+  
+  <!-- Include validation -->
+  <rule name="include-validation">
+    <description>Important includes must be accessible</description>
+    <constraint>Files marked important="true" must exist and be loadable</constraint>
   </rule>
 </validation-rules>
 ```
 
-## External Includes
+## Examples
 
-### View Includes
+### Complete Application Structure
 
-```xml
-<views>
-  <view-include src="business-views.xml" important="true" />
-  <view-include src="admin-views.xml" important="false" />
-  <!-- Local view definitions -->
-</views>
 ```
-
-### Pattern Includes
-
-```xml
-<patterns>
-  <pattern-include src="windows-controls.xml" important="true" />
-  <pattern-include src="custom-controls.xml" important="false" />
-  <!-- Local pattern definitions -->
-</patterns>
-```
-
-### Validation Includes
-
-```xml
-<validation-rules>
-  <validation-include src="base-validation.xml" important="true" />
-  <validation-include src="view-validation.xml" important="false" />
-  <!-- Local validation rules -->
-</validation-rules>
+project/
+├── main.xml                    # Main document with includes
+├── patterns/
+│   ├── abstract-controls.xml   # Base control definitions
+│   ├── winform-controls.xml    # WinForms-specific controls
+│   └── avalonia-controls.xml   # Avalonia-specific controls
+├── views/
+│   ├── business-views.xml      # Business entity views
+│   └── admin-views.xml         # Administrative views
+├── windows/
+│   ├── main-windows.xml        # Primary application windows
+│   ├── dialog-windows.xml      # Modal dialogs and popups
+│   └── admin-windows.xml       # Administrative interfaces
+└── validation/
+    ├── base-validation.xml     # Core validation rules
+    ├── view-validation.xml     # View-specific rules
+    └── accessibility-rules.xml # Accessibility compliance
 ```
 
-## Examples
+### Platform-Specific Builds
 
-### Complete Application with Views
+Generate different outputs for different platforms:
 
 ```xml
-<ui-layout-def>
-  <validation-rules>
-    <validation-include src="base-validation.xml" important="true" />
-  </validation-rules>
-  
-  <patterns>
-    <pattern-include src="windows-controls.xml" important="true" />
-    <!-- Pattern definitions... -->
-  </patterns>
-  
-  <views>
-    <!-- Product management view -->
-    <view name="ProductView" type="business-entity" category="core">
-      <metadata>
-        <model-class>Product</model-class>
-        <view-model-class>ProductViewModel</view-model-class>
-      </metadata>
-      
-      <dependencies>
-        <view-ref name="CategoryView" relationship="lookup" />
-      </dependencies>
-      
-      <data-context>
-        <property name="currentProduct" type="Product" scope="view" />
-        <property name="productList" type="ProductList" scope="view" />
-      </data-context>
-      
-      <windows>
-        <window-ref name="ProductListWindow" role="main" default="true" />
-        <window-ref name="ProductEditDialog" role="editor" modal="true" />
-      </windows>
-      
-      <navigation>
-        <action name="show-list" target="ProductListWindow" />
-        <action name="edit-product" target="ProductEditDialog" context="currentProduct" />
-      </navigation>
-    </view>
-    
-    <!-- Category lookup view -->
-    <view name="CategoryView" type="utility" category="core">
-      <windows>
-        <window-ref name="CategoryListDialog" role="main" modal="true" />
-      </windows>
-    </view>
-  </views>
-  
-  <!-- Window definitions -->
-  <window name="ProductListWindow" title="Product List" 
-          wireframe="StandardAppLayout" view="ProductView">
-    <view-properties>
-      <role>main</role>
-      <default>true</default>
-      <data-context-binding>productList</data-context-binding>
-    </view-properties>
-    
-    <slot-overrides>
-      <slot name="main-content">
-        <ListView name="productGrid" view-mode="details">
-          <columns>
-            <column name="name" text="Product Name" width="200" />
-            <column name="category" text="Category" width="150" />
-            <column name="price" text="Price" width="100" />
-          </columns>
-        </ListView>
-      </slot>
-    </slot-overrides>
-  </window>
-  
-  <window name="ProductEditDialog" title="Edit Product" 
-          wireframe="DialogLayout" view="ProductView">
-    <view-properties>
-      <role>editor</role>
-      <modal>true</modal>
-      <data-context-binding>currentProduct</data-context-binding>
-    </view-properties>
-    
-    <slot-overrides>
-      <slot name="dialog-body">
-        <FormField name="nameField" label-text="Product Name:" required="true">
-          <TextBox name="nameInput" slot="input" />
-        </FormField>
-        
-        <FormField name="categoryField" label-text="Category:">
-          <ComboBox name="categoryCombo" slot="input" />
-        </FormField>
-      </slot>
-    </slot-overrides>
-  </window>
-</ui-layout-def>
+<!-- For WinForms -->
+<pattern-include src="winform-controls.xml" important="true" />
+<pattern-include src="avalonia-controls.xml" important="false" />
+
+<!-- For Avalonia -->
+<pattern-include src="avalonia-controls.xml" important="true" />
+<pattern-include src="winform-controls.xml" important="false" />
 ```
 
 ## Best Practices
 
-### 1. View Organization
-
-- Group related windows by business function
-- Use inheritance for common view patterns
-- Define clear view dependencies
-- Document view responsibilities
+### 1. Project Organization
+- Use external includes for better modularity
+- Separate concerns: patterns, views, windows, validation
+- Group related functionality in dedicated files
+- Use consistent naming conventions
 
 ### 2. View Design Patterns
-
 - **Single Responsibility**: Each view should handle one business concept
 - **Dependency Injection**: Use view dependencies rather than tight coupling
 - **Data Context**: Define clear data scopes (view, shared, global)
 - **Navigation**: Centralize navigation logic within views
 
-### 3. Naming Conventions
-
-- Use PascalCase for view names with "View" suffix
-- Use descriptive names indicating business purpose
-- Group related views with common prefixes (OrderView, OrderItemView)
+### 3. Include Management
+- Mark critical includes as `important="true"`
+- Document include dependencies
+- Use version control for include files
+- Test with missing optional includes
 
-### 4. Code Generation Strategy
+### 4. Platform Compatibility
+- Define abstract controls for common functionality
+- Use platform-specific includes for specialized features
+- Test on all target platforms
+- Maintain compatibility matrices
 
+### 5. Code Generation Strategy
 - Map views to view model classes
 - Generate navigation methods
 - Create dependency injection configuration
@@ -631,76 +495,66 @@ Windows can inherit from wireframe layouts and override specific slots:
 ### Enhanced Platform Integration
 
 **Windows Forms / WPF**
+- Complete control library support
 - Generate view classes with proper MVVM binding
 - Create dependency injection containers
 - Generate navigation services
-- Support for Windows-specific patterns
+
+**Avalonia UI**
+- Full Avalonia control set
+- Cross-platform compatibility
+- Modern UI patterns and styling
+- MVVM architecture support
 
 **Qt / KDE**
-- Generate Qt view classes
-- Support for KDE desktop integration
+- Qt widget system integration
+- KDE desktop integration patterns
 - Cross-platform Qt navigation
 
 **Web / HTML**
 - Generate MVC views or React components
 - Support for SPA routing
 - Progressive web app patterns
+- Responsive design support
 
 **Mobile**
-- Generate platform-specific view controllers
-- Support for mobile navigation patterns
+- Platform-specific view controllers
+- Mobile navigation patterns
 - Responsive view layouts
+- Touch-optimized interactions
 
-## Migration from Version 1.0
-
-### Backward Compatibility
+## Migration Guide
 
-Version 1.1 maintains full backward compatibility with 1.0 documents. Existing documents will work without modification, but won't benefit from view organization features.
+### From Version 1.1 to 1.2
 
-### Migration Steps
+#### Backward Compatibility
+Version 1.2 maintains full backward compatibility with 1.1 documents. Existing documents will work without modification.
 
-1. **Add Views Section**: Introduce `<views>` section
-2. **Group Windows**: Organize related windows into views
-3. **Add View Properties**: Enhance windows with view properties
-4. **Define Dependencies**: Specify view relationships
-5. **Update Validation**: Add view-specific validation rules
+#### New Features Available
+1. **Window Includes**: Organize windows in separate files
+2. **Enhanced Schema**: Better validation and error reporting
+3. **Extended Platform Support**: More control libraries
+4. **Advanced View Features**: Workflows, modules, communication
 
-### Gradual Migration
+#### Migration Steps
+1. **Update Schema Reference**: Change version to "1.2"
+2. **Optional: Reorganize Windows**: Move windows to separate files
+3. **Optional: Add Platform Controls**: Include platform-specific patterns
+4. **Optional: Enhance Views**: Add communication, workflows, modules
+5. **Update Validation**: Add new validation rule includes
 
+#### Gradual Migration
 You can migrate gradually by:
-- Adding views for new functionality
-- Keeping existing windows as-is
-- Gradually moving windows into views
-- Updating code generation templates
-
-## Code Generation
-
-### Generated View Classes (C# Example)
-
-```csharp
-// Generated from ProductView definition
-public class ProductView : BaseEntityView, IProductView
-{
-    public ProductListWindow ProductListWindow { get; private set; }
-    public ProductEditDialog ProductEditDialog { get; private set; }
-    
-    // Data context properties
-    public Product CurrentProduct { get; set; }
-    public ObservableCollection<Product> ProductList { get; set; }
-    
-    // Dependencies
-    public ICategoryView CategoryView { get; set; }
-    
-    // Navigation methods
-    public void ShowList() => ProductListWindow.Show();
-    public void EditProduct(Product product) => ProductEditDialog.ShowDialog(product);
-    
-    // View behaviors
-    public async Task RefreshData() { /* ... */ }
-    public async Task SaveChanges() { /* ... */ }
-}
-```
+- Keeping existing structure initially
+- Adding new features incrementally
+- Testing each enhancement
+- Moving to external includes when beneficial
+
+### Schema Updates
+- Update XSD reference to ui-layout-def-1.2.xsd
+- Enhanced validation will catch more potential issues
+- Better error messages for debugging
 
 ---
 
-*This format specification enables consistent, validated, cross-platform UI definitions with powerful view organization, inheritance, and modular design capabilities.*
+*This format specification enables consistent, validated, cross-platform UI definitions with powerful view organization, external includes, inheritance, and modular design capabilities.*

+ 561 - 39
UILayoutDefinitionFormat/ui-layout-def.xsd

@@ -3,20 +3,43 @@
            targetNamespace="ui-layout-definition"
            xmlns:tns="ui-layout-definition"
            elementFormDefault="qualified"
-           version="1.1">
+           version="1.2">
 
   <!-- Root element -->
   <xs:element name="ui-layout-def" type="tns:UILayoutDefType"/>
 
+  <!-- Root element for window include files -->
+  <xs:element name="windows" type="tns:WindowIncludeFileType"/>
+
   <!-- Main document structure -->
   <xs:complexType name="UILayoutDefType">
     <xs:sequence>
       <xs:element name="validation-rules" type="tns:ValidationRulesType" minOccurs="0"/>
       <xs:element name="patterns" type="tns:PatternsType"/>
       <xs:element name="views" type="tns:ViewsType" minOccurs="0"/>
+      <xs:element name="window-includes" type="tns:WindowIncludesType" minOccurs="0"/>
+      <xs:element name="window" type="tns:WindowType" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="version" type="xs:string" default="1.2"/>
+  </xs:complexType>
+
+  <!-- Window Include Files Structure -->
+  <xs:complexType name="WindowIncludeFileType">
+    <xs:sequence>
       <xs:element name="window" type="tns:WindowType" maxOccurs="unbounded"/>
     </xs:sequence>
-    <xs:attribute name="version" type="xs:string" default="1.1"/>
+  </xs:complexType>
+
+  <!-- Window Includes -->
+  <xs:complexType name="WindowIncludesType">
+    <xs:sequence>
+      <xs:element name="window-include" type="tns:WindowIncludeType" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="WindowIncludeType">
+    <xs:attribute name="src" type="xs:string" use="required"/>
+    <xs:attribute name="important" type="xs:boolean" default="false"/>
   </xs:complexType>
 
   <!-- Validation Rules -->
@@ -363,6 +386,7 @@
   <!-- Control Definition -->
   <xs:complexType name="ControlType">
     <xs:sequence>
+      <xs:element name="description" type="xs:string" minOccurs="0"/>
       <xs:element name="constraints" type="tns:ConstraintsType" minOccurs="0"/>
       <xs:element name="attributes" type="tns:AttributesType" minOccurs="0"/>
       <xs:element name="behavior" type="tns:BehaviorType" minOccurs="0"/>
@@ -376,6 +400,7 @@
 
   <xs:simpleType name="ControlTypeEnum">
     <xs:restriction base="xs:string">
+      <xs:enumeration value="base"/>
       <xs:enumeration value="action"/>
       <xs:enumeration value="input"/>
       <xs:enumeration value="display"/>
@@ -384,11 +409,15 @@
       <xs:enumeration value="navigation"/>
       <xs:enumeration value="system"/>
       <xs:enumeration value="dialog"/>
+      <xs:enumeration value="layout"/>
+      <xs:enumeration value="media"/>
+      <xs:enumeration value="decoration"/>
     </xs:restriction>
   </xs:simpleType>
 
   <xs:simpleType name="ControlCategoryEnum">
     <xs:restriction base="xs:string">
+      <xs:enumeration value="abstract"/>
       <xs:enumeration value="basic"/>
       <xs:enumeration value="input"/>
       <xs:enumeration value="action"/>
@@ -397,6 +426,34 @@
       <xs:enumeration value="navigation"/>
       <xs:enumeration value="composite"/>
       <xs:enumeration value="windows-specific"/>
+      <xs:enumeration value="winforms-basic"/>
+      <xs:enumeration value="winforms-input"/>
+      <xs:enumeration value="winforms-action"/>
+      <xs:enumeration value="winforms-container"/>
+      <xs:enumeration value="winforms-data"/>
+      <xs:enumeration value="winforms-status"/>
+      <xs:enumeration value="winforms-menu"/>
+      <xs:enumeration value="winforms-toolbar"/>
+      <xs:enumeration value="winforms-scroll"/>
+      <xs:enumeration value="winforms-display"/>
+      <xs:enumeration value="winforms-system"/>
+      <xs:enumeration value="winforms-validation"/>
+      <xs:enumeration value="winforms-dialog"/>
+      <xs:enumeration value="winforms-web"/>
+      <xs:enumeration value="avalonia-specific"/>
+      <xs:enumeration value="avalonia-layout"/>
+      <xs:enumeration value="avalonia-input"/>
+      <xs:enumeration value="avalonia-display"/>
+      <xs:enumeration value="avalonia-data"/>
+      <xs:enumeration value="avalonia-container"/>
+      <xs:enumeration value="avalonia-decoration"/>
+      <xs:enumeration value="avalonia-navigation"/>
+      <xs:enumeration value="avalonia-popup"/>
+      <xs:enumeration value="avalonia-window"/>
+      <xs:enumeration value="avalonia-media"/>
+      <xs:enumeration value="avalonia-notification"/>
+      <xs:enumeration value="avalonia-composite"/>
+      <xs:enumeration value="avalonia-graphics"/>
       <xs:enumeration value="kde-specific"/>
       <xs:enumeration value="web-specific"/>
     </xs:restriction>
@@ -439,8 +496,23 @@
       <xs:enumeration value="enum"/>
       <xs:enumeration value="color"/>
       <xs:enumeration value="date"/>
+      <xs:enumeration value="datetime"/>
+      <xs:enumeration value="timespan"/>
       <xs:enumeration value="icon"/>
+      <xs:enumeration value="image"/>
       <xs:enumeration value="object"/>
+      <xs:enumeration value="decimal"/>
+      <xs:enumeration value="float"/>
+      <xs:enumeration value="double"/>
+      <xs:enumeration value="char"/>
+      <xs:enumeration value="font"/>
+      <xs:enumeration value="size"/>
+      <xs:enumeration value="point"/>
+      <xs:enumeration value="padding"/>
+      <xs:enumeration value="thickness"/>
+      <xs:enumeration value="corner-radius"/>
+      <xs:enumeration value="brush"/>
+      <xs:enumeration value="geometry"/>
     </xs:restriction>
   </xs:simpleType>
 
@@ -453,6 +525,7 @@
 
   <xs:complexType name="EventType">
     <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="alias" type="xs:string"/>
     <xs:attribute name="required" type="xs:boolean" default="false"/>
     <xs:attribute name="handler-required" type="xs:boolean" default="false"/>
     <xs:attribute name="bubbles" type="xs:boolean" default="false"/>
@@ -468,29 +541,122 @@
       <xs:element name="nodes" type="tns:NodesType"/>
       <xs:element name="tabs" type="tns:TabsType"/>
       <xs:element name="children" type="tns:ChildrenType"/>
-      <xs:element name="property-categories" type="tns:PropertyCategoriesType"/>
+      <xs:element name="selected-items" type="tns:SelectedItemsType"/>
       <xs:element name="context-menu" type="tns:ContextMenuType"/>
-      <xs:element name="central-widget" type="tns:CentralWidgetType"/>
-      <xs:element name="toolbars" type="tns:ToolbarsType"/>
-      <xs:element name="dock-widgets" type="tns:DockWidgetsType"/>
+      <xs:element name="panel1" type="tns:PanelType"/>
+      <xs:element name="panel2" type="tns:PanelType"/>
+      <xs:element name="panels" type="tns:PanelsType"/>
+      <xs:element name="tabpages" type="tns:TabPagesType"/>
+      <xs:element name="table-layout" type="tns:TableLayoutType"/>
+      <xs:element name="grid-definitions" type="tns:GridDefinitionsType"/>
+      <xs:element name="view" type="tns:ListViewType"/>
+      <xs:element name="links" type="tns:LinksType"/>
+      <xs:element name="sub-items" type="tns:SubItemsType"/>
+      <xs:element name="pane" type="tns:PaneType"/>
+      <xs:element name="content" type="tns:ContentType"/>
     </xs:choice>
   </xs:complexType>
 
   <!-- Structure Components -->
   <xs:complexType name="ItemsType">
-    <xs:sequence>
-      <xs:element name="item" type="tns:ItemType" maxOccurs="unbounded"/>
-    </xs:sequence>
+    <xs:choice maxOccurs="unbounded">
+      <xs:element name="item" type="tns:ItemType"/>
+      <xs:element name="listbox-item" type="tns:ListBoxItemType"/>
+      <xs:element name="listview-item" type="tns:ListViewItemType"/>
+      <xs:element name="tree-view-item" type="tns:TreeViewItemType"/>
+      <xs:element name="combo-box-item" type="tns:ComboBoxItemType"/>
+      <xs:element name="menu-item" type="tns:MenuItemStructureType"/>
+      <xs:element name="status-item" type="tns:StatusItemType"/>
+      <xs:element name="toolbar-item" type="tns:ToolbarItemType"/>
+      <xs:element name="ListBoxItem" type="tns:ControlInstanceType"/>
+      <xs:element name="ComboBoxItem" type="tns:ControlInstanceType"/>
+      <xs:element name="TreeViewItem" type="tns:ControlInstanceType"/>
+      <xs:element name="TabItem" type="tns:ControlInstanceType"/>
+    </xs:choice>
     <xs:attribute name="min-count" type="xs:int" default="0"/>
     <xs:attribute name="max-count" type="xs:string" default="unlimited"/>
+    <xs:attribute name="max-depth" type="xs:int"/>
   </xs:complexType>
 
   <xs:complexType name="ItemType">
     <xs:sequence>
       <xs:element name="values" type="tns:ValuesType" minOccurs="0"/>
+      <xs:element name="subitems" type="tns:SubItemsType" minOccurs="0"/>
     </xs:sequence>
     <xs:attribute name="value" type="xs:string"/>
     <xs:attribute name="text" type="xs:string"/>
+    <xs:attribute name="selected" type="xs:boolean" default="false"/>
+    <xs:attribute name="enabled" type="xs:boolean" default="true"/>
+    <xs:attribute name="image" type="xs:string"/>
+    <xs:attribute name="imageindex" type="xs:int" default="-1"/>
+    <xs:attribute name="checked" type="xs:boolean" default="false"/>
+    <xs:attribute name="checkstate" type="xs:string"/>
+    <xs:attribute name="tag" type="xs:string"/>
+  </xs:complexType>
+
+  <xs:complexType name="ListBoxItemType">
+    <xs:attribute name="value" type="xs:string" use="required"/>
+    <xs:attribute name="text" type="xs:string" use="required"/>
+    <xs:attribute name="selected" type="xs:boolean" default="false"/>
+    <xs:attribute name="enabled" type="xs:boolean" default="true"/>
+    <xs:attribute name="image" type="xs:string"/>
+  </xs:complexType>
+
+  <xs:complexType name="ListViewItemType">
+    <xs:sequence>
+      <xs:element name="values" type="tns:ValuesType"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="TreeViewItemType">
+    <xs:sequence>
+      <xs:element name="children" type="tns:TreeViewChildrenType" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="text" type="xs:string" use="required"/>
+    <xs:attribute name="value" type="xs:string" use="required"/>
+    <xs:attribute name="expanded" type="xs:boolean" default="false"/>
+    <xs:attribute name="selected" type="xs:boolean" default="false"/>
+    <xs:attribute name="checked" type="xs:boolean" default="false"/>
+    <xs:attribute name="image" type="xs:string"/>
+    <xs:attribute name="enabled" type="xs:boolean" default="true"/>
+  </xs:complexType>
+
+  <xs:complexType name="TreeViewChildrenType">
+    <xs:sequence>
+      <xs:element name="tree-view-item" type="tns:TreeViewItemType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="min-count" type="xs:int" default="0"/>
+    <xs:attribute name="max-count" type="xs:string" default="unlimited"/>
+    <xs:attribute name="max-depth" type="xs:int" default="10"/>
+  </xs:complexType>
+
+  <xs:complexType name="ComboBoxItemType">
+    <xs:attribute name="content" type="xs:string"/>
+    <xs:attribute name="is-selected" type="xs:boolean" default="false"/>
+  </xs:complexType>
+
+  <xs:complexType name="StatusItemType">
+    <xs:sequence>
+      <xs:element name="control-ref" type="tns:ControlRefType"/>
+    </xs:sequence>
+    <xs:attribute name="type" type="xs:string" use="required"/>
+    <xs:attribute name="text" type="xs:string"/>
+  </xs:complexType>
+
+  <xs:complexType name="ToolbarItemType">
+    <xs:sequence>
+      <xs:element name="control-ref" type="tns:ControlRefType"/>
+    </xs:sequence>
+    <xs:attribute name="type" type="xs:string" use="required"/>
+    <xs:attribute name="text" type="xs:string"/>
+    <xs:attribute name="tooltip" type="xs:string"/>
+    <xs:attribute name="image" type="xs:string"/>
+    <xs:attribute name="enabled" type="xs:boolean" default="true"/>
+    <xs:attribute name="visible" type="xs:boolean" default="true"/>
+  </xs:complexType>
+
+  <xs:complexType name="ControlRefType">
+    <xs:attribute name="allowed-types" type="xs:string" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="ValuesType">
@@ -504,27 +670,68 @@
     <xs:attribute name="text" type="xs:string" use="required"/>
   </xs:complexType>
 
+  <xs:complexType name="SubItemsType">
+    <xs:sequence>
+      <xs:element name="subitem" type="tns:SubItemType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="SubItemType">
+    <xs:attribute name="text" type="xs:string" use="required"/>
+  </xs:complexType>
+
   <xs:complexType name="MenuItemsType">
     <xs:sequence>
-      <xs:element name="menu-item" type="tns:MenuItemType" maxOccurs="unbounded"/>
+      <xs:element name="menu-item" type="tns:MenuItemStructureType" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="min-count" type="xs:int" default="1"/>
     <xs:attribute name="max-count" type="xs:string" default="unlimited"/>
+    <xs:attribute name="max-depth" type="xs:int"/>
   </xs:complexType>
 
-  <xs:complexType name="MenuItemType">
+  <xs:complexType name="MenuItemStructureType">
+    <xs:sequence>
+      <xs:element name="sub-items" type="tns:MenuSubItemsType" minOccurs="0"/>
+      <xs:element name="menu-items" type="tns:MenuItemsType" minOccurs="0"/>
+    </xs:sequence>
     <xs:attribute name="text" type="xs:string" use="required"/>
     <xs:attribute name="action" type="xs:string"/>
     <xs:attribute name="shortcut" type="xs:string"/>
     <xs:attribute name="separator" type="xs:boolean" default="false"/>
+    <xs:attribute name="value" type="xs:string"/>
+    <xs:attribute name="enabled" type="xs:boolean" default="true"/>
+    <xs:attribute name="visible" type="xs:boolean" default="true"/>
+    <xs:attribute name="checked" type="xs:boolean" default="false"/>
+    <xs:attribute name="image" type="xs:string"/>
+    <xs:attribute name="shortcutkeys" type="xs:string"/>
+    <xs:attribute name="header" type="xs:string"/>
+    <xs:attribute name="command" type="xs:string"/>
+    <xs:attribute name="input-gesture" type="xs:string"/>
+    <xs:attribute name="is-checkable" type="xs:boolean" default="false"/>
+    <xs:attribute name="is-checked" type="xs:boolean" default="false"/>
+  </xs:complexType>
+
+  <xs:complexType name="MenuSubItemsType">
+    <xs:sequence>
+      <xs:element name="menu-item" type="tns:MenuItemStructureType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="min-count" type="xs:int" default="0"/>
+    <xs:attribute name="max-count" type="xs:string" default="unlimited"/>
+    <xs:attribute name="max-depth" type="xs:int" default="5"/>
   </xs:complexType>
 
   <xs:complexType name="ColumnsType">
     <xs:sequence>
-      <xs:element name="column" type="tns:ColumnType" maxOccurs="unbounded"/>
+      <xs:element name="column" type="tns:ColumnType" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="column-item" type="tns:ColumnItemType" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="grid-view-column" type="tns:GridViewColumnType" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="DataGridTextColumn" type="tns:DataGridTextColumnType" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="DataGridCheckBoxColumn" type="tns:DataGridCheckBoxColumnType" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="DataGridComboBoxColumn" type="tns:DataGridComboBoxColumnType" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="DataGridTemplateColumn" type="tns:DataGridTemplateColumnType" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="min-count" type="xs:int" default="1"/>
-    <xs:attribute name="max-count" type="xs:int" default="20"/>
+    <xs:attribute name="max-count" type="xs:int" default="50"/>
   </xs:complexType>
 
   <xs:complexType name="ColumnType">
@@ -532,6 +739,56 @@
     <xs:attribute name="text" type="xs:string" use="required"/>
     <xs:attribute name="width" type="xs:string"/>
     <xs:attribute name="sortable" type="xs:boolean" default="false"/>
+    <xs:attribute name="headertext" type="xs:string"/>
+    <xs:attribute name="datapropertyname" type="xs:string"/>
+    <xs:attribute name="visible" type="xs:boolean" default="true"/>
+    <xs:attribute name="readonly" type="xs:boolean" default="false"/>
+    <xs:attribute name="resizable" type="xs:boolean" default="true"/>
+    <xs:attribute name="sortmode" type="xs:string"/>
+    <xs:attribute name="textalign" type="xs:string"/>
+  </xs:complexType>
+
+  <xs:complexType name="ColumnItemType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="text" type="xs:string" use="required"/>
+    <xs:attribute name="width" type="xs:int" default="100"/>
+    <xs:attribute name="sortable" type="xs:boolean" default="true"/>
+    <xs:attribute name="visible" type="xs:boolean" default="true"/>
+    <xs:attribute name="alignment" type="xs:string" default="left"/>
+    <xs:attribute name="data-type" type="xs:string" default="text"/>
+  </xs:complexType>
+
+  <xs:complexType name="GridViewColumnType">
+    <xs:attribute name="header" type="xs:string"/>
+    <xs:attribute name="display-member-binding" type="xs:string"/>
+    <xs:attribute name="width" type="xs:string" default="auto"/>
+  </xs:complexType>
+
+  <xs:complexType name="DataGridTextColumnType">
+    <xs:attribute name="header" type="xs:string"/>
+    <xs:attribute name="binding" type="xs:string"/>
+    <xs:attribute name="width" type="xs:string" default="*"/>
+    <xs:attribute name="is-read-only" type="xs:boolean" default="false"/>
+  </xs:complexType>
+
+  <xs:complexType name="DataGridCheckBoxColumnType">
+    <xs:attribute name="header" type="xs:string"/>
+    <xs:attribute name="binding" type="xs:string"/>
+    <xs:attribute name="width" type="xs:string" default="auto"/>
+    <xs:attribute name="is-read-only" type="xs:boolean" default="false"/>
+  </xs:complexType>
+
+  <xs:complexType name="DataGridComboBoxColumnType">
+    <xs:attribute name="header" type="xs:string"/>
+    <xs:attribute name="binding" type="xs:string"/>
+    <xs:attribute name="width" type="xs:string" default="*"/>
+    <xs:attribute name="is-read-only" type="xs:boolean" default="false"/>
+  </xs:complexType>
+
+  <xs:complexType name="DataGridTemplateColumnType">
+    <xs:attribute name="header" type="xs:string"/>
+    <xs:attribute name="width" type="xs:string" default="*"/>
+    <xs:attribute name="is-read-only" type="xs:boolean" default="false"/>
   </xs:complexType>
 
   <xs:complexType name="NodesType">
@@ -540,7 +797,7 @@
     </xs:sequence>
     <xs:attribute name="min-count" type="xs:int" default="0"/>
     <xs:attribute name="max-count" type="xs:string" default="unlimited"/>
-    <xs:attribute name="max-depth" type="xs:int" default="10"/>
+    <xs:attribute name="max-depth" type="xs:int" default="50"/>
   </xs:complexType>
 
   <xs:complexType name="NodeType">
@@ -551,11 +808,15 @@
     <xs:attribute name="value" type="xs:string"/>
     <xs:attribute name="expanded" type="xs:boolean" default="false"/>
     <xs:attribute name="checked" type="xs:boolean" default="false"/>
+    <xs:attribute name="imageindex" type="xs:int" default="-1"/>
+    <xs:attribute name="selectedimageindex" type="xs:int" default="-1"/>
+    <xs:attribute name="tag" type="xs:string"/>
   </xs:complexType>
 
   <xs:complexType name="TabsType">
     <xs:sequence>
-      <xs:element name="tab" type="tns:TabType" maxOccurs="unbounded"/>
+      <xs:element name="tab" type="tns:TabType" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="TabItem" type="tns:TabItemType" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="min-count" type="xs:int" default="1"/>
     <xs:attribute name="max-count" type="xs:int" default="20"/>
@@ -572,36 +833,197 @@
     </xs:complexContent>
   </xs:complexType>
 
-  <xs:complexType name="ChildrenType">
-    <xs:attribute name="allow-multiple" type="xs:boolean" default="true"/>
+  <xs:complexType name="TabItemType">
+    <xs:complexContent>
+      <xs:extension base="tns:ControlContentType">
+        <xs:sequence>
+          <xs:element name="items" type="tns:TabItemItemsType" minOccurs="0"/>
+        </xs:sequence>
+        <xs:attribute name="header" type="xs:string"/>
+        <xs:attribute name="is-selected" type="xs:boolean" default="false"/>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+
+  <xs:complexType name="TabItemItemsType">
+    <!-- Tab content -->
   </xs:complexType>
 
-  <xs:complexType name="PropertyCategoriesType">
+  <xs:complexType name="TabPagesType">
     <xs:sequence>
-      <xs:element name="category" type="tns:PropertyCategoryType" maxOccurs="unbounded"/>
+      <xs:element name="tabpage" type="tns:TabPageType" maxOccurs="unbounded"/>
     </xs:sequence>
+    <xs:attribute name="min-count" type="xs:int" default="0"/>
+    <xs:attribute name="max-count" type="xs:string" default="unlimited"/>
   </xs:complexType>
 
-  <xs:complexType name="PropertyCategoryType">
+  <xs:complexType name="TabPageType">
     <xs:attribute name="name" type="xs:string" use="required"/>
-    <xs:attribute name="display-name" type="xs:string" use="required"/>
-    <xs:attribute name="expanded" type="xs:boolean" default="true"/>
+    <xs:attribute name="text" type="xs:string" use="required"/>
+    <xs:attribute name="tooltip" type="xs:string"/>
+    <xs:attribute name="imageindex" type="xs:int" default="-1"/>
+  </xs:complexType>
+
+  <xs:complexType name="ChildrenType">
+    <xs:sequence>
+      <xs:element name="child" type="tns:ChildType" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="allow-multiple" type="xs:boolean" default="true"/>
+  </xs:complexType>
+
+  <xs:complexType name="ChildType">
+    <xs:attribute name="grid-row" type="xs:int"/>
+    <xs:attribute name="grid-column" type="xs:int"/>
+    <xs:attribute name="grid-row-span" type="xs:int" default="1"/>
+    <xs:attribute name="grid-column-span" type="xs:int" default="1"/>
+    <xs:attribute name="dock" type="xs:string"/>
+    <xs:attribute name="canvas-left" type="xs:double"/>
+    <xs:attribute name="canvas-top" type="xs:double"/>
+    <xs:attribute name="canvas-right" type="xs:double"/>
+    <xs:attribute name="canvas-bottom" type="xs:double"/>
+  </xs:complexType>
+
+  <xs:complexType name="SelectedItemsType">
+    <xs:attribute name="max-count" type="xs:string" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="ContextMenuType">
-    <!-- Context menu structure can be defined here -->
+    <xs:attribute name="max-count" type="xs:int" default="1"/>
   </xs:complexType>
 
-  <xs:complexType name="CentralWidgetType">
+  <xs:complexType name="PanelType">
+    <xs:sequence>
+      <xs:element name="children" type="tns:ChildrenType"/>
+    </xs:sequence>
     <xs:attribute name="required" type="xs:boolean" default="true"/>
   </xs:complexType>
 
-  <xs:complexType name="ToolbarsType">
-    <xs:attribute name="max-count" type="xs:int" default="10"/>
+  <xs:complexType name="PanelsType">
+    <xs:sequence>
+      <xs:element name="panel" type="tns:PanelRefType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="min-count" type="xs:int" default="2"/>
+    <xs:attribute name="max-count" type="xs:int" default="2"/>
+  </xs:complexType>
+
+  <xs:complexType name="PanelRefType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
   </xs:complexType>
 
-  <xs:complexType name="DockWidgetsType">
-    <xs:attribute name="max-count" type="xs:int" default="20"/>
+  <xs:complexType name="TableLayoutType">
+    <xs:sequence>
+      <xs:element name="columns" type="tns:TableColumnsType"/>
+      <xs:element name="rows" type="tns:TableRowsType"/>
+      <xs:element name="cells" type="tns:CellsType"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="TableColumnsType">
+    <xs:sequence>
+      <xs:element name="column" type="tns:TableColumnType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="min-count" type="xs:int" default="1"/>
+    <xs:attribute name="max-count" type="xs:string" default="unlimited"/>
+  </xs:complexType>
+
+  <xs:complexType name="TableColumnType">
+    <xs:attribute name="sizetype" type="xs:string" use="required"/>
+    <xs:attribute name="size" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="TableRowsType">
+    <xs:sequence>
+      <xs:element name="row" type="tns:TableRowType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="min-count" type="xs:int" default="1"/>
+    <xs:attribute name="max-count" type="xs:string" default="unlimited"/>
+  </xs:complexType>
+
+  <xs:complexType name="TableRowType">
+    <xs:attribute name="sizetype" type="xs:string" use="required"/>
+    <xs:attribute name="size" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="CellsType">
+    <xs:sequence>
+      <xs:element name="cell" type="tns:CellType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="CellType">
+    <xs:attribute name="column" type="xs:int" use="required"/>
+    <xs:attribute name="row" type="xs:int" use="required"/>
+    <xs:attribute name="columnspan" type="xs:int" default="1"/>
+    <xs:attribute name="rowspan" type="xs:int" default="1"/>
+  </xs:complexType>
+
+  <xs:complexType name="GridDefinitionsType">
+    <xs:sequence>
+      <xs:element name="row-definitions" type="tns:RowDefinitionsType"/>
+      <xs:element name="column-definitions" type="tns:ColumnDefinitionsType"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="RowDefinitionsType">
+    <xs:sequence>
+      <xs:element name="row-definition" type="tns:RowDefinitionType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="RowDefinitionType">
+    <xs:attribute name="height" type="xs:string" use="required"/>
+    <xs:attribute name="min-height" type="xs:string" default="0"/>
+    <xs:attribute name="max-height" type="xs:string" default="Infinity"/>
+  </xs:complexType>
+
+  <xs:complexType name="ColumnDefinitionsType">
+    <xs:sequence>
+      <xs:element name="column-definition" type="tns:ColumnDefinitionType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="ColumnDefinitionType">
+    <xs:attribute name="width" type="xs:string" use="required"/>
+    <xs:attribute name="min-width" type="xs:string" default="0"/>
+    <xs:attribute name="max-width" type="xs:string" default="Infinity"/>
+  </xs:complexType>
+
+  <xs:complexType name="ListViewType">
+    <xs:sequence>
+      <xs:element name="grid-view" type="tns:GridViewType"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="GridViewType">
+    <xs:sequence>
+      <xs:element name="columns" type="tns:ColumnsType"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="LinksType">
+    <xs:sequence>
+      <xs:element name="link" type="tns:LinkType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="min-count" type="xs:int" default="0"/>
+    <xs:attribute name="max-count" type="xs:string" default="unlimited"/>
+  </xs:complexType>
+
+  <xs:complexType name="LinkType">
+    <xs:attribute name="start" type="xs:string" use="required"/>
+    <xs:attribute name="length" type="xs:string" use="required"/>
+    <xs:attribute name="linkdata" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="PaneType">
+    <xs:complexContent>
+      <xs:extension base="tns:ControlContentType"/>
+    </xs:complexContent>
+  </xs:complexType>
+
+  <xs:complexType name="ContentType">
+    <xs:complexContent>
+      <xs:extension base="tns:ControlContentType"/>
+    </xs:complexContent>
   </xs:complexType>
 
   <!-- Structure Definition -->
@@ -615,6 +1037,7 @@
     <xs:attribute name="name" type="xs:string" use="required"/>
     <xs:attribute name="type" type="xs:string" use="required"/>
     <xs:attribute name="category" type="tns:ControlCategoryEnum" use="required"/>
+    <xs:attribute name="inherits" type="xs:string"/>
   </xs:complexType>
 
   <!-- Wireframe Definition -->
@@ -718,6 +1141,9 @@
 
   <xs:group name="ControlContentGroup">
     <xs:choice>
+      <!-- Abstract Controls -->
+      <xs:element name="CommonControl" type="tns:ControlInstanceType"/>
+      
       <!-- Basic Controls -->
       <xs:element name="Label" type="tns:ControlInstanceType"/>
       <xs:element name="TextBox" type="tns:ControlInstanceType"/>
@@ -730,25 +1156,121 @@
       <xs:element name="TreeView" type="tns:ControlInstanceType"/>
       <xs:element name="TabControl" type="tns:ControlInstanceType"/>
       <xs:element name="ButtonBar" type="tns:ControlInstanceType"/>
+      <xs:element name="ListBox" type="tns:ControlInstanceType"/>
+      <xs:element name="CheckBox" type="tns:ControlInstanceType"/>
+      <xs:element name="RadioButton" type="tns:ControlInstanceType"/>
+      <xs:element name="Image" type="tns:ControlInstanceType"/>
+      <xs:element name="StatusBar" type="tns:ControlInstanceType"/>
+      <xs:element name="ToolBar" type="tns:ControlInstanceType"/>
+      <xs:element name="SplitPanel" type="tns:ControlInstanceType"/>
+      <xs:element name="Separator" type="tns:ControlInstanceType"/>
       
-      <!-- Windows-Specific Controls -->
+      <!-- WinForms-Specific Controls -->
       <xs:element name="RichTextBox" type="tns:ControlInstanceType"/>
-      <xs:element name="PropertyGrid" type="tns:ControlInstanceType"/>
+      <xs:element name="MaskedTextBox" type="tns:ControlInstanceType"/>
+      <xs:element name="CheckedListBox" type="tns:ControlInstanceType"/>
+      <xs:element name="GroupBox" type="tns:ControlInstanceType"/>
+      <xs:element name="SplitContainer" type="tns:ControlInstanceType"/>
+      <xs:element name="TableLayoutPanel" type="tns:ControlInstanceType"/>
+      <xs:element name="FlowLayoutPanel" type="tns:ControlInstanceType"/>
+      <xs:element name="DataGridView" type="tns:ControlInstanceType"/>
+      <xs:element name="ProgressBar" type="tns:ControlInstanceType"/>
+      <xs:element name="StatusStrip" type="tns:ControlInstanceType"/>
+      <xs:element name="MenuStrip" type="tns:ControlInstanceType"/>
+      <xs:element name="ToolStrip" type="tns:ControlInstanceType"/>
+      <xs:element name="ContextMenuStrip" type="tns:ControlInstanceType"/>
+      <xs:element name="NumericUpDown" type="tns:ControlInstanceType"/>
+      <xs:element name="DateTimePicker" type="tns:ControlInstanceType"/>
+      <xs:element name="MonthCalendar" type="tns:ControlInstanceType"/>
+      <xs:element name="TrackBar" type="tns:ControlInstanceType"/>
+      <xs:element name="HScrollBar" type="tns:ControlInstanceType"/>
+      <xs:element name="VScrollBar" type="tns:ControlInstanceType"/>
+      <xs:element name="PictureBox" type="tns:ControlInstanceType"/>
+      <xs:element name="Timer" type="tns:ControlInstanceType"/>
+      <xs:element name="OpenFileDialog" type="tns:ControlInstanceType"/>
+      <xs:element name="SaveFileDialog" type="tns:ControlInstanceType"/>
+      <xs:element name="FolderBrowserDialog" type="tns:ControlInstanceType"/>
+      <xs:element name="ColorDialog" type="tns:ControlInstanceType"/>
+      <xs:element name="FontDialog" type="tns:ControlInstanceType"/>
+      <xs:element name="PrintDialog" type="tns:ControlInstanceType"/>
+      <xs:element name="PrintPreviewDialog" type="tns:ControlInstanceType"/>
+      <xs:element name="WebBrowser" type="tns:ControlInstanceType"/>
       <xs:element name="NotifyIcon" type="tns:ControlInstanceType"/>
+      <xs:element name="ErrorProvider" type="tns:ControlInstanceType"/>
+      <xs:element name="ToolTip" type="tns:ControlInstanceType"/>
+      <xs:element name="HelpProvider" type="tns:ControlInstanceType"/>
+      <xs:element name="LinkLabel" type="tns:ControlInstanceType"/>
+      <xs:element name="TabPage" type="tns:ControlInstanceType"/>
       
-      <!-- KDE-Specific Controls -->
-      <xs:element name="KComboBox" type="tns:ControlInstanceType"/>
-      <xs:element name="KMainWindow" type="tns:ControlInstanceType"/>
-      <xs:element name="KFileDialog" type="tns:ControlInstanceType"/>
-      
-      <!-- Web-Specific Controls -->
-      <xs:element name="WebBrowser" type="tns:ControlInstanceType"/>
-      <xs:element name="DatePicker" type="tns:ControlInstanceType"/>
+      <!-- Avalonia-Specific Controls -->
+      <xs:element name="AvaloniaButton" type="tns:ControlInstanceType"/>
+      <xs:element name="RepeatButton" type="tns:ControlInstanceType"/>
+      <xs:element name="StackPanel" type="tns:ControlInstanceType"/>
+      <xs:element name="Grid" type="tns:ControlInstanceType"/>
+      <xs:element name="DockPanel" type="tns:ControlInstanceType"/>
+      <xs:element name="WrapPanel" type="tns:ControlInstanceType"/>
+      <xs:element name="Canvas" type="tns:ControlInstanceType"/>
+      <xs:element name="UniformGrid" type="tns:ControlInstanceType"/>
+      <xs:element name="AvaloniaTextBox" type="tns:ControlInstanceType"/>
+      <xs:element name="AutoCompleteBox" type="tns:ControlInstanceType"/>
+      <xs:element name="AvaloniaComboBox" type="tns:ControlInstanceType"/>
+      <xs:element name="CalendarDatePicker" type="tns:ControlInstanceType"/>
+      <xs:element name="TimePicker" type="tns:ControlInstanceType"/>
+      <xs:element name="Slider" type="tns:ControlInstanceType"/>
+      <xs:element name="AvaloniaLabel" type="tns:ControlInstanceType"/>
+      <xs:element name="TextBlock" type="tns:ControlInstanceType"/>
+      <xs:element name="AvaloniaListView" type="tns:ControlInstanceType"/>
+      <xs:element name="DataGrid" type="tns:ControlInstanceType"/>
+      <xs:element name="AvaloniaTreeView" type="tns:ControlInstanceType"/>
+      <xs:element name="Border" type="tns:ControlInstanceType"/>
+      <xs:element name="ScrollViewer" type="tns:ControlInstanceType"/>
+      <xs:element name="Expander" type="tns:ControlInstanceType"/>
+      <xs:element name="SplitView" type="tns:ControlInstanceType"/>
+      <xs:element name="MenuBar" type="tns:ControlInstanceType"/>
+      <xs:element name="ContextMenu" type="tns:ControlInstanceType"/>
+      <xs:element name="FlyoutBase" type="tns:ControlInstanceType"/>
+      <xs:element name="Window" type="tns:ControlInstanceType"/>
+      <xs:element name="UserControl" type="tns:ControlInstanceType"/>
+      <xs:element name="MediaElement" type="tns:ControlInstanceType"/>
+      <xs:element name="ColorPicker" type="tns:ControlInstanceType"/>
+      <xs:element name="PathIcon" type="tns:ControlInstanceType"/>
+      <xs:element name="Viewbox" type="tns:ControlInstanceType"/>
+      <xs:element name="NotificationCard" type="tns:ControlInstanceType"/>
       
       <!-- Structure Elements -->
       <xs:element name="FormField" type="tns:ControlInstanceType"/>
+      <xs:element name="AvaloniaFormField" type="tns:ControlInstanceType"/>
+      <xs:element name="AvaloniaButtonBar" type="tns:ControlInstanceType"/>
+      <xs:element name="AvaloniaToolbar" type="tns:ControlInstanceType"/>
+      <xs:element name="AvaloniaStatusBar" type="tns:ControlInstanceType"/>
       <xs:element name="slot" type="tns:SlotType"/>
-      <xs:element name="wireframe-instance" type="tns:WireframeInstanceType"/>
+      
+      <!-- Item Elements -->
+      <xs:element name="ListBoxItem" type="tns:ControlInstanceType"/>
+      <xs:element name="ComboBoxItem" type="tns:ControlInstanceType"/>
+      <xs:element name="TreeViewItem" type="tns:ControlInstanceType"/>
+      <xs:element name="TabItem" type="tns:ControlInstanceType"/>
+      <xs:element name="MenuItem" type="tns:ControlInstanceType"/>
+      <xs:element name="NativeMenuItem" type="tns:ControlInstanceType"/>
+      
+      <!-- Data Grid Columns -->
+      <xs:element name="DataGridColumn" type="tns:ControlInstanceType"/>
+      <xs:element name="DataGridTextColumn" type="tns:ControlInstanceType"/>
+      <xs:element name="DataGridCheckBoxColumn" type="tns:ControlInstanceType"/>
+      <xs:element name="DataGridComboBoxColumn" type="tns:ControlInstanceType"/>
+      <xs:element name="DataGridTemplateColumn" type="tns:ControlInstanceType"/>
+      
+      <!-- Tool Strip Items -->
+      <xs:element name="ToolStripMenuItem" type="tns:ControlInstanceType"/>
+      <xs:element name="ToolStripButton" type="tns:ControlInstanceType"/>
+      <xs:element name="ToolStripLabel" type="tns:ControlInstanceType"/>
+      <xs:element name="ToolStripSeparator" type="tns:ControlInstanceType"/>
+      <xs:element name="ToolStripComboBox" type="tns:ControlInstanceType"/>
+      <xs:element name="ToolStripTextBox" type="tns:ControlInstanceType"/>
+      <xs:element name="ToolStripStatusLabel" type="tns:ControlInstanceType"/>
+      <xs:element name="ToolStripProgressBar" type="tns:ControlInstanceType"/>
+      <xs:element name="ToolStripDropDownButton" type="tns:ControlInstanceType"/>
+      <xs:element name="ToolStripSplitButton" type="tns:ControlInstanceType"/>
     </xs:choice>
   </xs:group>