Welcome to Phizzpop    Sign in to Windows Live ID | Create a Profile | Help
          
      
Friday, August 29, 2008    
Details
Easy XAML and Video in Silverlight With Visual Studio 2008 and .NET 3.5 with ASP.NET

ASP.NET with Visual Studio 2008

Requirements: Visual Studio 2008 and ASP.NET Futures Release 

In Visual Studio 2008 it will be very easy to create Silverlight enabled applications.  Here's a quick "How-To"...

Open Visual Studio 2008 with ASP.NET Futures Release installed... Select FILE NEW WEBSITE from the menu, it will bring you an options menu that shows projects that look like this...

Figure1

You can then select the version of the .NET Runtime you want to use, in this case we will target version 3.5 which corresponds to requirements of the ASP.NET futures release.. For this project we will not select the AJAX version of the project.

Your Visual Studio Project will be created and you will see the project files in the Solution Explorer window..

Figure3

 

Double click on the default.aspx page to open that file in the design surface..

then from the toolbox drag and drop the XAML control onto the design surface.. It will open a design wizard...

Figure4

 

Now let's add our xaml files to the ASP.NET page.. right click on the solution explorer on the project icon and select add existing files..

 

Figure6

and select add existing files from the pop up menu to add your XAML files to the project...

 

Figure5

Next we are going back to XAML control properties and tell it where the XAML files are in our project...  So if you look at the properties window with the XAML1 control selected on the page, it will look like this...

 

Figure7

Enter the name of the XAML file and path to it from with the XAMLUrl property

Now you have just added a XAML file to your ASP.NET page..

Now hit Build Web Site from the BUILD menu

and you will have  a webpage with XAML added to it..

 

Figure8

It's that simple with ASP.NET

To add Silverlight Video it's just as easy...

Add the .wmv file to your project if it is local through the same method as above from the Solution Explorer  by right clicking and selecting Add Existing Item..

Figure9

 

Drag and drop the MEDIA control icon from the tool box onto the designer surface of the page...

Figure10

from the pop-up menu Common Media Tasks enter the URL to the media file ( if it's on a server this could be a URL to a media Server) or in this case Butterfly.wmv for our local sample file..

Figure11

You can also select the skin for the player from a number of default styles (or create your own), by selecting Configure skin..

Figure12

And that's a tour of adding video and XAML to your website in ASP.NET and Visual Studio 2008 with .NET 3.5..

Published Wednesday, October 31, 2007 10:48 PM by Don Burnett

Comments

No Comments
Anonymous comments are disabled

About Don Burnett

Don Burnett is a technology evangelist, project manager, interactive designer, and nationally recognized technology blogger specializing in rich media application development for web and desktop. Don's past work for creating, designing, and deploying multimedia applications and products include Disney Interactive, SegaSoft, Universal Interactive, and MediaOne. http://Blog.DonBurnett.com

 

This Blog

Syndication

© 2008 Microsoft Corporation.