You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/05/26 07:27:19 UTC

[royale-docs] branch master updated: example of MXML code highlight

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/royale-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new 0cf3e6a  example of MXML code highlight
0cf3e6a is described below

commit 0cf3e6a66943bd3e35d26dbd74781d8eb2d9448a
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sun May 26 09:27:13 2019 +0200

    example of MXML code highlight
---
 Welcome/Features/MXML.md | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/Welcome/Features/MXML.md b/Welcome/Features/MXML.md
index c7352bc..4c0c807 100644
--- a/Welcome/Features/MXML.md
+++ b/Welcome/Features/MXML.md
@@ -23,3 +23,29 @@ title: MXML
 The declarative XML-based user interface markup language
 
 MXML is an XML language that you use, when building an application in Royale, to lay out user-interface components.
+
+```mxml
+<?xml version="1.0" encoding="utf-8"?>
+<j:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
+        xmlns:j="library://ns.apache.org/royale/jewel" 
+        xmlns:html="library://ns.apache.org/royale/html">
+
+    <fx:Script>
+    <![CDATA[      
+        private function clickHandler(event:MouseEvent):void {
+            button.emphasis = (button.emphasis == Button.PRIMARY) ? "" : Button.PRIMARY;
+        }
+    ]]>
+    </fx:Script>
+
+    <j:Card width="600">
+        <html:H3 text="items expand test"/>
+
+        <j:HGroup itemsExpand="true" gap="3">
+            <j:Button text="Hello" click="clickHandler(event)"/>
+            <j:Button text="Apache"/>
+            <j:Button text="Royale!!!!"/>
+        </j:HGroup>
+    </j:Card>
+</j:Group>
+```
\ No newline at end of file