About the "Silverlight Migration Edition" of C#/XAML for HTML5
This feature requires the version 1.0 Beta 11 (or newer) of C#/XAML for HTML5
What is the "Silverlight Migration Edition"?
The "Silverlight Migration Edition" is an edition of C#/XAML for HTML5 that is made specifically for individuals and companies who want to migrate their Silverlight application(s) to the web.
It contains special features that make it even easier and faster to port Silverlight applications to HTML.
Please refer to the Editions Comparison page for an overview, or keep reading for the detailed list of differences compared to the Professional Edition.
How does it differ from the "Professional Edition"?
The "Silverlight Migration Edition" contains all the same features as the Professional Edition, plus the following exclusive ones:
- "Silverlight-style" project templates specifically designed for migrating Silverlight apps to HTML.
The basic idea for migrating a Silverlight application is the following:
1. you can create a new "Silverlight-style Empty Application" project
2. then you copy/paste your Silverlight classes into that new project and click "Start".
(note: for full compatibility, you will likely need to adapt your code and make some changes; please read the Silverlight Migration Guide for details)
- Compatibility with the Silverlight namespaces. For example, the "Button" control is located in the namespace "System.Windows.Controls". This is unlike the other editions, which use the same namespaces as UWP/WinRT. For example, the "Button" control in the "Professional Edition" is located in the namespace "Windows.UI.Xaml.Controls".
- Improved Silverlight compatibility, including:
- Same event names and handlers (for example, the event "MouseLeftButtonDown" is used instead of UWP's "PointerPressed")
- Same Visual State names in ControlTemplates (for example, "MouseOver" is used instead of UWP's "PointerOver")
- Same class names (for example, "Key" is used instead of UWP's "VirtualKey")
- Same method signatures (for example, in IValueConverter, "CultureInfo" is used instead of UWP's "string")
- Across-the-board improved compatibility (for example, "GetPosition" is used that returns a "Point", instead of UWP's "GetCurrentPoint" that returns a "PointerPoint")
- (Planned for 2017-2018) Compatibility with the Silverlight version of some popular 3rd party controls. More details will be announced on Twitter, Facebook, and the Pre-releases section of the forums => stay tuned!
Note: the Professional Edition can also be used to migrate Silverlight apps to the web. However, due to the lack of the features listed above, and the fact that the Professional Edition uses the UWP flavor of C# and XAML, more effort is needed to migrate your Silverlight code compared to the dedicated "Silverlight Migration Edition".
To try it out, just download the Free Edition, install it, launch Visual Studio, click File -> New -> Project, and choose the "Silverlight Migration Edition - Empty Application". Then, run the project. A window will appear telling you to start the free Trial. Click "Start the free trial" to continue.
Click here for Pricing and Products Comparison.
Click here to Proceed with the Purchase.
Where can I find more information about how to port my Silverlight application to the web using this product?
Please read the Silverlight Migration Guide. You will also find more information on the product homepage, the documentation, and the forums.
For the latest updates - to see what's new - please check our twitter and facebook feeds, as well as the Pre-releases section of the forums.
For further assistance, please contact us.
I already have an existing project of type "CSHTML5" (made with the Free Edition or with the Professional Edition). How can I convert it into a project of type "Silverlight Migration Edition" ?
- First, before converting your project, make sure that it compiles properly.
- Unload your CSHTML5 project. To do so, right-click on the project name in the Solution Explorer, and click "Unload Project"
- Edit the ".CSPROJ" file. To do so, right-click again on your unloaded CSHTML5 project in the Solution Explorer, and click "Edit xxxxx.csproj" (where xxxxx is your project name)
- Scroll to the end of the file and change the following line of code:
<Import Project="$(MSBuildProgramFiles32)\MSBuild\CSharpXamlForHtml5\InternalStuff\Targets\CSharpXamlForHtml5.Build.targets" />
into the following:
<Import Project="$(MSBuildProgramFiles32)\MSBuild\CSharpXamlForHtml5\InternalStuff\Targets\SLMigration.CSharpXamlForHtml5.Build.targets" />
- Reload your project. To do so, right-click again on your unloaded CSHTML5 project in the Solution Explorer, and click "Reload Project"
- Compile your project. You will get several compilation errors that are due to the conversion. This is normal. Fix these errors one by one. until the project compiles properly.
Here is the list of errors that are expected:
- You will be asked to add some references and to remove some other references.
- You will be told that some namespaces do not exist. This is due to the fact that the "Silverlight Edition" projects use the same namespaces as the Silverlight projects. Therefore you will need to change the "usings". For example, "using Windows.UI.Xaml.Controls" will need to be changed to "using System.Windows.Controls". The compiler errors will guide you.
- You will be told that some events and properties do not exist. This is due to the fact that the "Silverlight Edition" projects use the same names as the Silverlight projects. For example, the "PointerPressed" event will need to be replaced with the "MouseLeftButtonDown" event. The compiler errors will guide you.
- Add the text "SLMIGRATION" (without the quotes) to the list of the "Conditional Compilation Symbols" of your project. To do so, right-click on the project name in the Solution Explorer, click "Properties", go to the "Build" tab, and add "SLMIGRATION" to the "Conditional Compilation Symbols" field. Please note that symbols are separated by semicolons. Here is an example of value that you may put in the field:
- That's all. Your CSHTML5 project has now been converted into a CSHTML5 "Silverlight Migration Edition" project.
Please click here for contact information.