Skip to content

Example 1: Simple window

Athari edited this page Jan 15, 2013 · 1 revision

JAML

_={
    $: 'Window root',
    Resources: [{
        $: 'Style MyButtonStyle Button',
        set: {
            Background: 'Red', Foreground: 'Green'
        },
        on: {
            '{=this.IsMouseOver}': {set: {
                Background: 'Yellow', Foreground: 'Blue'
            }}
        }
    }],
    _: [{
        $: 'Grid',
        RowDefinitions: [ { Height: '*' } ],
        ColumnDefinitions: [ { Width: '*' } ],
        _: [{
            $: 'Button btnPressMe', Content: 'Press me!', Style: '{@MyButtonStyle}'
        }]
    }]
}