Categories: Silverlight Posted by yeejie on 11/29/2008 7:00 PM | Comments (0)

After installation of Silverlight 2 RC, I found out that some of my Silverlight 1.0 applications are not working properly. A few searches show that there are few known issues:

Exceptions Reported instead of silent failures on Image URLs.

In Silverlight 1, if your application had a state where you were loading an image from an invalid URL it would fail silently, and no exception would be raised. Silverlight 2 raises an exception in this case, so if you wrote your code without an exception handler for this scenario, your end users would see a Silverlight error dialog if they are using Silverlight 2. Other than that, your application would behave in the same way (i.e. it would be unable to load the image from the invalid URL)

Action: Ensure that you are using exception handling before reading an image from a URL.

Change of behavior when Double Encoding Image URLs

Silverlight 1 was unable to handle some characters in Image URLs, and as such double encoding was necessary. This has been fixed in Silverlight 2, so if you have hard coded double-encoded URLs in your application, you may have some invalid URL errors thrown (see above)

Action: Remove any double-encoded hard coded URLs, and replace with normal URLs. Ensure that you are using exception handling before reading an image from a URL.

Change of behavior when reading XAML with relative path specifiers

This only applies when you specify the XAML on the Silverlight plug-in object. If you specified the XAML location using relative path specifiers (i.e. http://mydomain.com/app/../location.xaml), Silverlight 1.0 would resolve the URL. Silverlight 2 does not, and the full URL needs to be specified.

Action: Ensure that you are not using relative path specifiers on your XAML. Ensure that you are using exception handling on the plugin.

Exceptions Reported instead of silent failures on invalid XAML

When using createFromXAML to load XAML into your render tree at runtime, Silverlight 1.0 was forgiving of invalid XAML where you had a property at the root element of the XAML string that you are parsing. Silverlight 2 will throw and exception in this case.

Additionally XAML properties that were invalid would fail silently in Silverlight 1. If you had, for example, the following XAML: <TextBlock><Canvas.RenderTransform>…</Canvas.RenderTransform></TextBlock>

Silverlight 1.0 would be forgiving of this error, but Silverlight 2 will throw an exception.

Action: Ensure that you are using exception handling. If your XAML throws any exceptions due to these invalid properties you will need to fix your XAML.

Null reported instead of success on searching some XAML

When using findName() to find a XAML element, in Silverlight 1.0, in the case of a Storyboard, if you searched for a transform (example <Canvas.RenderTransform><ScaleTransform.ScaleX>), you would receive a positive result. However, this is inconsistent, and in Silverlight 2, you will receive ‘null’ as results of this search.

Action: Make sure your object is named and search for it by name instead of property path.

Exception on specific Text Wrapping property instead of silent failure

When using a TextBlock, Silverlight 1.0 mapped the ‘WrapWithOverflow’ setting to ‘Wrap’ on the TextWrapping property when it hit it, and as such this invalid property did not cause an exception. Silverlight 2 does not have this behavior, so the XAML will not parse and an exception will be thrown.

Action: Replace instances of the ‘WrapWithOverFlow’ setting with ‘Wrap’.

Line breaking differences on TextBlock

In some cases, a TextBlock would wrap text if not enough horizontal space was provided, despite the fact that it was not instructed to do so through property settings. This has been fixed in Silverlight 2, and as such you may see some places where your text is not wrapping where it did previously.

Action: If your TextBlocks look different with Silverlight 2 than they did with 1.0 this is the cause. You’ll need to edit your XAML to get the desired results.

Different handling of markers in an ASX file

In Silverlight 1, only markers that were within the duration specified in an ASX would be visible. In Silverlight 2, all markers are visible, so if you have an application that uses markers, and in particular pre-reads these markers, you may see some slightly different behavior.

Action: If you are pre-reading markers, and are receiving markers that are outside of your expected time range, you will need to truncate them manually.

For more information, refer to “Ensuring that your JavaScript Silverlight applications work with Silverlight 2“.

Categories: Bizspark Posted by yeejie on 11/15/2008 7:00 PM | Comments (0)

BizSpark is an innovative new program that unites Startups with entrepreneurial and technology resources in a global community with a common goal of supporting and accelerating the success of a new generation of high-potential Startups.

Here’s some requirements to enroll in BizSpark:

  • You get development-only licensing for everything from VS Team Studio to Excel for everyone developing in your startup for up to 3 years.
  • You get development and production licenses for up to 3 years for Windows Server, SQL Server, SharePoint and the other Microsoft servers you might want to use to power your web app.
  • You get an MSDN subscription that lets you into the moderated tech support groups and 2 tech support incidents a year.
  • You pay zip until you quit the program, or hit $1 million a year revenue, or the 3 years is up. Then you pay a disconnect fee of $100.
  • Your company has to be privately held, younger than 3 years, and be making less than $1 million year revenue when you enter the program.
  • You get BizSpark from a BizSpark Network Partner (various VCs, angel networks, user/startup groups and others) or from certain Microsoft employees.
  • BizSpark is global: some adjustments in price conditions in some countries.

For more information on how to join the programme, look into 47Hats.com.