Frequently Asked Questions
This page is under construction.
What is XMLUI?
XMLUI is a framework for building user interfaces using a specialized XML-based markup language, along with optional inline scripting. It provides a structured approach to defining components, styling, data handling, and user interactions, all within a simple and extensible environment.
Do I need to know JavaScript to use XMLUI?
Not necessarily. XMLUI’s scripting language is a lightweight subset of JavaScript and is only used sparingly for specific UI logic. In most cases, you can build functional interfaces with just XMLUI markup and optional code-behind files. Full JavaScript knowledge is not required.
How do I create a new component?
Components are defined directly in XMLUI markup by using tags that represent the component type. You can also customize their properties, attach event handlers, and even define reusable templates to tailor the component’s appearance and behavior.
What is the difference between a property and a template property?
A property configures a single aspect of a component’s appearance, behavior, or functionality. A template property holds a component definition itself, allowing you to specify how child elements—like items in a list—are rendered.
How do I handle events, such as button clicks?
Components handle certain events by default, but you can add custom event handlers using attributes prefixed with on, or by declaring event logic in code-behind files. This lets you implement particular app logic in response to user actions or system events.
Can I reuse components across my application?
Yes. XMLUI supports creating reusable components that can be declared once and then integrated in multiple places. You can also share them as third-party components for others to use.
How do I style my application?
XMLUI offers themes and layout properties to style your application. Themes define global and component-specific visual settings, while layout properties control traits like colors, padding, and borders. Theme variables let you adjust styles consistently, and changing a theme variable instantly updates all components that use it.
Is it possible to fetch and display data from backend APIs?
Yes. XMLUI’s data binding mechanism allows you to provide a URL to a backend API endpoint. The framework then fetches and makes the data available to components automatically, without additional scripting.
What if my data changes over time?
XMLUI includes automatic data change detection. When data updates, affected parts of the UI refresh automatically. This means that if you add items to a list or modify data behind the scenes, the UI will update accordingly without requiring extra scripting.
How can I reference external assets like images or icons?
XMLUI supports resources, which can be defined via URLs and referenced in your markup or themes. This makes it easy to incorporate icons, images, fonts, or other external assets into your application.
Where can I put my custom logic if the markup becomes too complex?
For logic that doesn’t fit directly in markup, you can use a code-behind file. This file, associated with a particular component, contains scripting logic separate from the markup, helping maintain a clean structure and better organization of your application’s code.