Below is a list of Silverlight 3 bugs you might run into. The plan is for at least most of these to be fixed at some point in the future. 


Cross-domain XAP
If you are loading a XAP source file from a cross domain location, (that is loading the XAP from a location other than the server providing the Web page), and you are enabling scripting to the Silverlight application, (by setting HtmlAccess=”enabled” on the ASP.NET Silverlight controls), a JavaScript error may occur.

You can resolve this issue by either:

-          Modifying your Web page to use the object tag, (and accompanying Silverlight.js file), or,

-          Disable HtmlAccess on the Silverlight controls if they are not needed, or,

-     Use the source code in the code gallery build.  The code gallery build and source code has a fix that has been applied for this issue. See Obtaining the Source Code for the ASP.NET Silverlight Controls. 



CPU Utilization While the Application is Idle
If you are loading a large XAML or XAP with the ASP.NET Silverlight controls, then there may be a case where the client CPU is being used, even though there is no activity in the Silverlight application.

You can resolve this issue by either:

-          Modifying your application to use the object tag, and do not handle the sourceDownloadProgress or the sourceDownloadComplete events on the plug-in, or,

-          Patch your Web application with the following JavaScript:

<asp:Silverlight

OnPluginSourceDownloadComplete="downloadComplete" .. />

<script type=”text/javascript”>

function downloadComplete(sender, args) {

    var sb =

sender.get_element().content.FindName("LoadingAnimation2");

    if (sb) sb.Stop();

}

</script>

Use the source code in the code gallery build.  The code gallery build and source code has a fix that has been applied for this issue. See Obtaining the Source Code for the ASP.NET Silverlight Controls. 

 


Exception when opening OpenFileDialog/SaveFileDialog while debugging

Note that this is only an issue when you are debugging. This exception occures because there is a timeout for user-initiated actions.

Workaround: Set a breakpoint after the dialog is opened. 


Exception when opening OpenFileDialog/SaveFileDialog from a synchronous callout such as a KeyDown event handler.

Due to reentrancy issues with these dialogs, you cannot call them from KeyDown event handlers and other synchronous callouts such as LayoutUpdated and SizeChanged event handlers. The exception does not occur when the application is hosted in Internet Explorer running in protected mode.


Out of Browser: Mac (Tiger only) -- Application Install fails for applications with unicode shortnames

On the Mac OS (Tiger only), install fails when shortname contains unicode characters like:
呉音
தமிழ் 


VisualTreeHelper.FindElementsInHostCoordinates is not returning a element that has a Matrix3DProjection applied to it.

VisualTreeHelper.FindElementsInHostCoordinates does not work on elements that have Matrix3DProjection applied to it.


Videos in ListBox restart when they come into view.

Videos embedded in a ListBox may restart when the user scrolls the video(s) into view .


ScrollIntoView doesn't work when using StackPanel as ItemsPanel in ListBox. It works when using VirtualizingStackPanel.

The Workaround is to call UpdateLayout before ScrollIntoView.


Analytics.AverageProcessLoad and Analytics.AverageProcessorLoad report 0 while video is playing

These properties may erroneously return 0 when video is playing. This bug was discovered when creating a new Analytics object every 500ms. If the instance of the Analytics object is re-used, the bug is not observed.


Analytics constructor returns E_FAIL sporadically

This bug was discovered when creating a new Analytics object every 500ms. If the instance of the Analytics object is re-used, the bug is not observed.

 


FindName returns null for custom DataObject when used as DataContext in XAML

For example:

 <Grid x:Name="LayoutRoot" >
      <Grid.DataContext>
          <local:Foo x:Name="myDataObject"/>
      </Grid.DataContext>
</Grid>


public partial class MainPage : UserControl
{
    public MainPage()
    {
        InitializeComponent();
        object o = this.myDataObject; // this is null unexpectdly
    }
}

The workaround is to set up the DataObject as a named resource and use a reference to it as the DataContext,


Use Try/Catch Block with Analytics Object (Silverlight 3 bug)

Some folks have found that a small percentage of customer machines are throwing an exception when the Analytics object is instantiated. To work around this bug for now, use a Try/Catch block when you attempt to instantiate the Analytics object.

For more information on the underlying issue, see http://support.microsoft.com/kb/300956

 


Silverlight-based Windows Sidebar gadgets fail to retrieve network-based resources. 

To enable network access in Silverlight-based Sidebar gadgets, Silverlight 2 requires the x-gadget:// scheme in the Silverlight plug-in source parameter, as shown in the following example: 

<object ... >

<param name="source" value="x-gadget:///ClientBin/MyGadget.xap" />

</object>

 

Currently, Silverlight 3 blocks network access for the x-gadget:// scheme. To enable access in Silverlight 3, you must specify a relative URI, as shown in the following example: 

<object ... >

<param name="source" value="ClientBin/MyGadget.xap" />

</object>


NotifyCollectionChangedEventHandler.Target does not return ItemControl anymore

Now this returns WeakCollectionChangedListener.