2007年10月15日

Developing Silverlight on Mac Cont.

Sorry. I said Silverlight SDK is only provided for Windows, but there is ZIP compressed file from Microsoft.
You can use these files.
Download from here;
This is CNET Download site.

Now, I hope we could create environment.
Let's create a sample.
Just in case, if you have not created environment yet, please see my previous post

1. Run Eclipse
2. Create New Project. Select General Project. (You can name any)
3. Right click on created project in Package Explorer and select properties.
4. Select JavaScript profiles and select Silverlight1.0
5. Right Click the project and select New. Then select File.
6. Name the file as Default.htm. This will be a main page.
7. Repeat Step 5, and name each file as createSilverlight.js, Silverlight.js.
8. One more set. Repeat Step 5 and create a Xaml file. You can name it any but extension must be xaml.

OK. we have done to prepare basic file structure for Silverlight.
As I said, Default.htm is main page of your Silverlight. The Silverlight is based on Web page plug-in like a Flash , so it needs HTML page to show it.
This Default.htm page defines plug-in.

Actual createing Silverlight is createSilverlight.js file. This Javascript file load and show plug-in of Silverlight on Default.htm

Silverlight.js handles events of Silverlight. The events can be defined on xaml file, but xaml file cannot do anything about action. So we need handle events on Javascript file.
This is kind of Action Script file for Flash.

Xaml file is main point of Silverlight. We create object and define event on this file using like a XML format. This is not actual XML, it is similar.

Let's create Xaml next.

0 件のコメント: