Apr 17 2008

Silverlight 2.0 - Hello World part 2…

Published by john at 6:42 am under Silverlight, ActionScript 3

In silverlight you can easily add images thru the XAML or the classes (ie: c#)

To add it thru the XAML all you have to write is this:

 
<img Source="Picture.jpg" x:Name="MyImage" VerticalAlignment="Bottom" />

Here is the whole code:

 
 <usercontrol x:Class="SilverlightApplication1.Page"></usercontrol>xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300"&gt;
<grid Background="White" x:Name="LayoutRoot"></grid>
<img Source="Picture.jpg" x:Name="MyImage" VerticalAlignment="Bottom" />  
 
<button Content="Hello World!!" Width="200" Height="50" Click="onButtonClick" Background="Aquamarine" x:Name="test"></button>

You can see a demo here: demo

Next I will explore a third party class TWEENER, that works very similar to the TWEENER class build for ActionScript.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google]


Trackback URI | Comments RSS

Leave a Reply