Breaking change in Silverlight 3 for the Multi File Uploader


The Silverlight Multi File Uploader supports full control using JavaScript. You are able to open the file dialog, start uploading the files, clear the list, get upload progress all using JavaScript. There was no need to even show the Silverlight Multi File Uploader control.

However, Silverlight 3 has a breaking change.
The OpenFileDialog.ShowDialog() can only be opened from a user initiated event. What does this mean? It means, the dialog which lets you select files can only be opened after a user presses a button, pushed a checkbox or did something inside the Silverlight control.

Using JavaScript to show the OpenFileDialog does not count as a user initiated event. So you won't be able to trigger the opening of this window using your own JavaScript function anymore with Silverlight 3.

Full summary of breaking changed in Silverlight 3 Beta Release:

OpenFileDialog.ShowDialog() can now only be opened from a user initiated event

Who Is Affected: All applications.


For security reasons, OpenFileDialog.ShowDialog() may only be called during a user initiated event (MouseLeftButtonDown/Up and KeyDown/Up) or derived user event like clicking a button, checking a checkbox, etc.  This brings Silverlight into line with how the other major browsers and plug-ins behave.


HyperlinkButton now navigates the entire window and not just the IFRAME that Silverlight is in

Who Is Affected: Silverlight 2 applications recompiled for Silverlight 3 Beta.


In Silverlight 2, HyperlinkButton behaved inconsistently across browsers.  In Internet Explorer, HyperlinkButton will navigate the entire browser not just the current IFrame.

In other browsers, HyperlinkButton navigates only the current IFrame, which is consistent with HTML behavior.  In Silverlight 3 Beta, we've changed the behavior inside Internet Explorer to match the behavior in other browsers.


Mouse events inside a Popup now give positions relative to the pop-up not the entire application

Who Is Affected: Silverlight 2 applications recompiled for Silverlight 3 Beta.


Suppose you have an element inside a pop-up that listens to mouse events:



            <Border Name="border" MouseLeftButtonDown="OnMouseLeftButtonDown"/>




void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)


      e.GetPosition(border) ...



In Silverlight 2, the coordinates from MouseButtonEventArgs.GetPosition will be relative to the entire Silverlight plug-in, even though the application asked for coordinates relative to the border control (the parameter to GetPosition is supposed to indicate the frame of reference).  This has been fixed in Silverlight 3 Beta.


ReadOnlyObservableCollection moved from System.Windows.Controls.Data.dll to System.Windows.dll

Who Is Affected: Silverlight 2 applications recompiled for Silverlight 3 Beta.


This class has been moved into System.Windows.dll so that other APIs in System.Windows.dll can use it.  In order to minimize download size impact we've removed some uncommonly used methods. 


Note that this will not affect applications compiled for Silverlight 2.  If you use ReadOnlyObservableCollection in Silverlight 2, your .xap file will contain a copy of System.Windows.Controls.Data.dll.  When Silverlight 3 Beta runs your .xap, it will use the .xap's copy of System.Windows.Controls.Data.dll and that version of ReadOnlyObservableCollection, not the version that ships in the System.Windows.dll of Silverlight 3 Beta.



Pierre 19-03-2009
Do you plan on releasing a new version of your Multiple File Uploader based on SilverLight 3? That would be nice! Regards

Michiel 19-03-2009
@Pierre, yes I will continue to develop the Multi File Uploader and will upgrade it Silverlight 3 when SL3 is released or has a go live license.

Yasser 30-03-2009
it is a nice work Michiel, I was wondering if i can add more more features to the control , such as add text to describ the file and store it in DB tabel

New Comment

E-mail (not published)
Enter the code shown: