This paragraph gets you started on using the ESL tools in mixed mode. The following areas are convered:
ESL can import directly a silverlight project created
with Visual Studio or ESL.
Right click the blank of Project Explorer, select Import.
In the import dialog, expand the node Microsoft Silverlight and choose Silverlight Project, click Next.
Make sure the option "Select root directory:" is selected. Then click Browse button, select the root directory of the silverlight project in your computer. click OK.
Click Finish and open the XAML file, then you will see the project which imported is in the left Project Explorer. (The imported project here is a Button control with height=50, width=100, content="Push Me!" properties and named "MyButton" )
Project created by ESL also can be opened and edited in Visual Studio.
Right click the project name, select Open with->Open Visual Studio.
Make sure the Visual studio has successfully installed in your computer, then it will automatically opened with the project like below.
Now you can developing in Visual Studio, we add an event handler to the button. When click the button, its content changes to "Pushed". Open Page.xaml.cs file, copy below code in it.
private void ButtonClick(object sender, RoutedEventArgs arg1) { MyButton.Content = "Pushed"; }
Save (CTRL+S)your file, press F5 running the project.
Click the button, the content changed.
Close Visual Studio. Back to Eclipse, You need to refresh the project in "Project explorer" to take into consideration of new modification, and click the "Run" button at the top of Eclipse IDE, select the project which you'll running.
It runs like below.
Click the button, the button content also changed the same as what running in the Visual Studio.
Moreover, project created by ESL can be opened and edited with Expression Blend 2 for complicated design.
In the project explorer, right click HelloWorldTutorial, select Open with->Open Expression Blend.
The Expression Blend is opened and will pop-up a dialog like following, just click Yes.
Then the project opened in Expression Blend.
Now, we can use the tool to design the UI facility. Focus on the button, hold down the upper left corner of the button, the sharp of the pointer become a curve, drag it following the clock direction. Please see below snapshot.
The XAML code is generated automatically by the Expression Blend, Click XAML button at the right side of Page.xaml.
Close the Expression Blend. Eclipse will pop-up a File Changed dialog, click Yes.
Now the code in Eclipse also changed.
The build of Silverlight project relies on the build mechanism of Eclipse. By default, the build is set to automatic. The detail information about build system can be found in this Build chapiter.
The detail information can be found in this Run chapiter.