Skip to content

Hackety.org: “So Gooey: Can You See The Button”

May 11, 2007

So Gooey: Can You See The Button looks at JavaFX, Silverlight/Xaml, REBOL/View and Tcl/Tk.

This is their Silverlight/Xaml example.

<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml&quot;
    x:Class="MyNamespace.MyCanvasCodeInline"
    >
    <Button Click="Clicked">Press Me</Button>
    <x:Code><![CDATA[
        void Clicked(object sender, RoutedEventArgs e) { button1.Content = "You pressed me"; }
    ]]></x:Code>
</Page>

 

  • Xaml is XML, so it has the namespaces.
  • We have 2 namespaces because Silverlight elements are in one, the Xaml Language has the "x:" concepts.
  • For inline code, you need CDATA inside of XML.  (only if you have characters that confuse xml parsers)
  • Currently, you need x:Class if you want any event handlers.

Part of this is XML vs. code…

Having a bunch of tools that know how to parse the format, etc…

Perhaps somebody should look at drawing a smiley face with Shapes in the 4 formats?

 

Technorati tags: , ,

From → Silverlight

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: