silverlightdevelopmentfaq

Cancel
Save
Edit
Summary: This page lists frequently asked questions pertaining to Silverlight development. This is going to be a huge page so you might want to use Ctrl+F to find what you're looking for.


Note This FAQ covers detailed questions about Silverlight development. For answers to high-level questions like "What is Silverlight?", "What are its benefits?", etc see http://www.microsoft.com/silverlight/faq.aspx#7_0

General Development and Getting Started Questions




Where can I find samples of Silverlight applications?
Go to http://silverlight.net for a variety of showcase samples as well as samples that you can get the source code for.


Where do I get started learning Silverlight?
See http://silverlight.net/GetStarted/. This site includes links to SDK downloads, Silverlight bits, tools, etc.


What is the difference between Silverlight 1.0 and 1.1?
The two largest differences:
1. 1.0 is a released product while 1.1 is currently an alpha product.
2. 1.0 uses JavaScript while 1.1 supports .NET.
For a more complete list of differences, see http://silverlight.net/GetStarted/overview.aspx


Can I redistribute the Silverlight 1.1 Alpha September preview release?
No, Silverlight 1.1 Alpha September preview does not offer a Go-Live license at this time.


What languages can I use to develop Silverlight applications?
Silverlight 1.0 applications are written in XAML and the native JavaScript of the browser.
Silverlight 1.1 applications can be written in any .NET language, which includes C#, Visual Basic, and IronPython, and are available in the 1.1 Alpha release. A later release will include IronRuby.


Does the recently released Visual Studio 2008 Beta 2 and Expression Blend 2 August preview work with Silverlight 1.0 RTW?
Yes. Visual Studio 2008 Beta 2 also offers an updated Community Technology Preview (CTP) of the Silverlight Add-In for Visual Studio 2008. The add-in will enable developers to use Silverlight 1.0 RTW and Silverlight 1.1 Alpha September preview, capture the full power of Visual Studio 2008, and collaborate with designers using Expression Blend 2 September Preview.


When would a customer use Silverlight instead of ASP.NET AJAX?
Silverlight integrates with existing Web applications, including ASP.NET AJAX applications. Consequently, ASP.NET AJAX and Silverlight are designed to be complementary technologies. In the broader sense, Silverlight can talk to any AJAX application, both client-side and server-side. ASP.NET AJAX can additionally be used to control Silverlight-based visualization of data or delivery of rich experiences. Examples might include mapping applications or video playback with rich presentation.

ASP.NET AJAX and Silverlight at final release will also benefit its status as a fully supported technology from Microsoft with the benefits of technical support around the clock and the breadth support of the Microsoft development community. AJAX is a fundamental technology supported in Silverlight and now, in ASP.NET.

Customers can enhance existing ASP.NET or ASP.NET AJAX applications by using Silverlight's media experiences and RIAs.


When would a customer use Silverlight instead of Windows Presentation Foundation (WPF)? Is Silverlight more appropriate for certain types of applications?
WPF and Silverlight are complementary platforms, based on XAML for presentation:

*WPF provides a unified programming model for building the best Windows Vista era of smart-client user experiences that incorporate UI, 3D, media, and documents.
*Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of media experiences and RIAs for the Web by using a consistent subset of WPF features and the flexibility of AJAX for programmability.
Thus, both WPF and Silverlight enable developers and designers to develop visually stunning user experiences, but they are designed for different scenarios.


What features are missing from Silverlight presentation markup that will be supported in WPF (Windows Presentation Foundation)?
Some high-end Windows-specific features of WPF, such as real 3-D, hardware-based video acceleration, and full document support, will not be supported in Silverlight. This is by design to support Silverlight's cross-browser, cross-platform reach scenario, which demands a light-weight plug-in. However, Silverlight will offer a uniform runtime that can render identical experiences across browsers on both Mac OS and Windows. In addition, because both WPF and Silverlight support XAML, .NET, and role-specific tools namely Visual Studio and Expression Studio, designers and developers will be able to use the same skills and the same tools to build continuum user experiences spanning connected desktop applications for Windows to rich interactive applications/media experiences for the Web.


Where can I go to connect with other Silverlight developers to ask questions?
For Silverlight-related forums, blogs, and community resources for the CTP, visit the MSDN Silverlight Support and Community page or the Silverlight.net Forums Page

Coding Questions (XAML and procedural code)



How do I input text into a Silverlight application?
For Silverlight 1.0, there is no "TextBox". Rather, you have to overlay an HTML control over your Silverlight application and use JavaScript to bridge between the HTML control and the Silverlight application. This is explained in greater detail and a sample is shown in this topic: http://msdn2.microsoft.com/en-us/library/bb412399.aspx


How do I "drag 'n drop" in Silverlight?
Because of security concerns, Silverlight does not support dragging between processes but you can slide objects around on your Silverlight application. See http://silverlight.net/forums/t/4455.aspx for links to how to drag and drop with Silverlight.


How do I create Controls in Silverlight 1.0?
Silverlight 1.0 does not come with controls (e.g. button, sliders, etc). Silverlight 1.1 is expected to have a good set of controls. In the meantime for 1.0, you have to create them yourself. You can see an example here: http://silverlight.net/quickstarts/silverlight10/controls.aspx and a video here: http://timheuer.com/blog/archive/2007/08/19/implement-user-control-in-silverlight-user-controls.aspx



I want to animate a property but none of the animation objects will do it.
You can only animate doubles, colors, and points using DoubleAnimation, ColorAnimation, and PointAnimation respectively (oh, keyframe animations are available too using DoubleAnimationUsingKeyFrames, etc). However, you can use a Storyboard to create a timer, and then use the timer to programmatically change property values at specific time intervals. See http://msdn2.microsoft.com/en-us/library/bb738084.aspx to see how to create a timer.



What does this error message mean?
You can see a table of Silverlight 1.0 error messages and what they mean here: http://msdn2.microsoft.com/en-us/library/bb875979.aspx



My URL is not working or my media is not playing
If you have a URL in your Silverlight app that is not working, for example, if you store your media file on a different domain than your Silverlight app and it isn't working, this could be because of URL restrictions of Silverlight. These restrictions are in place for security reasons. You can learn more about URL security restrictions here: http://msdn2.microsoft.com/en-us/library/bb820909.aspx

Media Questions (audio and video)



Are there any new tools for creating and publishing media content with Silverlight?
Yes. Expression Encoder, a feature of Expression Media, will support live and on-demand encoding and template-based publishing of Silverlight media experiences. In addition, Silverlight works with the broad range of Windows Media encoding tools and utilities available today. See http://silverlight.net/GetStarted/ for a list of tools.


What is the relationship between Silverlight and Windows Media technologies?
Silverlight builds on top of Windows Media in a fashion similar to the Xbox XDK (Xbox Development Kit), enabling developers and designers to collaborate in building media experiences and RIAs. Silverlight is released by the Server and Tools Division at Microsoft as a part of the .NET Framework.


Is Silverlight a new media player?
No. Silverlight is a cross-browser, cross-platform plug-in for delivering media experiences and RIAs. It is not a desktop application or stand-alone media player.


What is the relationship between Silverlight and Windows Media Player?
The Silverlight browser plug-in is a separate component, independent of Windows Media Player. Silverlight is designed for delivery of cross-platform, cross-browser media experiences and rich interactive applications (RIAs) inside a Web browser combining audio, video, animation, overlays, and more. Windows Media Player delivers a breadth of local playback and user focused experiences, while also offering support for application and Web page embedding.


'''Do I need to have the latest version of Windows Media Player installed?
No. Silverlight is completely independent and when installed is less than 2 MB in size.


What audio or video formats are supported in Silverlight?
See http://msdn2.microsoft.com/en-us/library/bb412386.aspx.


Will Silverlight support all the codecs Windows Media Player supports?
Since Silverlight is a lightweight cross-platform technology, it only carries the most common codices that are needed for Web playback. However, we are gathering information from customers about the needed codices and can update Silverlight when necessary.


What is SMPTE VC-1?
VC-1 is an industry-standard video format, recognized by the Society of Motion Picture and Television Engineers (SMPTE), and most notably ships in all HD-DVD and Blu-ray Disc–certified electronics, hardware, and tools. Windows Media Video 9 (WMV-9) is the Microsoft implementation of the SMPTE VC-1 standard video codec. Microsoft initiated development of the standard with the release of WMV-9 to SMPTE.


Does Silverlight support HD quality?
Yes, Silverlight supports 720p, HD quality with considerable performance benefits over other solutions. Performance is dependent upon the central processing unit (CPU) capabilities of your computer and configurations. Generally, in testing, a 3-gigahertz (GHz) CPU and/or dual-core support greatly benefit the HD playback experience.


Will Silverlight support digital rights management?
For content providers, Silverlight will support digital rights management (DRM) built on the recently announced Microsoft PlayReady content access technology on Windows-based computers and Macintosh computers.


Will Silverlight-based applications run in Media Center? What about Media Center Extender?
Silverlight-based applications can run in Media Center but may have rendering issues on Media Center Extenders. Applications that are implemented using the Media Center SDK will provide a better experience. The engineering team is actively evaluating customer requirements for a variety of scenarios moving forward.