Easily migrate Silverlight/WPF apps to the Web thanks to CSHTML5

 

Why migrate Silverlight applications?

  • Silverlight is only supported on Internet Explorer, and Microsoft has announced that it will stop the support entirely on October 2021.

 

Why migrate WPF applications?

  • WPF only runs on Windows. It doesn't run on Mac OS, it doesn't run on Chromebooks, and it doesn't run on mobile devices.
  • WPF requires deployment and installation, it cannot be easily integrated in an intranet, and it doesn't run inside the web browser.

 

Why not rewrite the application from scratch?

Most of your C# and XAML code can be reused when migrating with CSHTML5, resulting in:

  • 3 to 5 times lower cost compared to rewriting the application from scratch
  • better productivity to maintain and improve the code, because your developers are already familiar with the source code of your application

 

What's unique about CSHTML5?

CSHTML5 is the only tool that lets you compile a large subset of Silverlight and WPF code to HTML and JavaScript, while keeping your source code in standard C# and XAML.

This results in:

  • Much lower cost of migration compared to alternatives (3 to 5 times lower on average)
  • Much shorter migration period (twice as short on average), so you are not prevented from developing new features for too long
  • Your application code remains in standard C# and XAML, resulting in:
    • Development continuity and lower cost for maintenance, because it remains the same identical source code (*97% of code remains unchanged on average)
    • Higher team productivity because there is no need to acquire new skills
    • Compatibility with other Microsoft C#/XAML-based technologies, in case you would like to keep the option of using your code on other platforms (Xamarin, Blazor...) or to share your code between the client and the server
    • Upcoming WebAssembly support via the work-in-progress compiler by Microsoft that directly compiles your C# code into native binaries without going through JavaScript at all

 

Do you offer development services to port Silverlight/WPF applications?

Yes, we have a very experienced team dedicated to the migration of Silverlight and WPF applications. We have already successfully ported many applications to HTML5, and we are constantly migrating Silverlight and WPF applications using CSHTML5.

The benefits of our services include:

  • A turn-key solution: you do not have to do anything, we take care of the development, testing, and everything else
  • Complimentary licenses for CSHTML5 (unlimited developer seats, all editions)
  • Full source code of CSHTML5 (commercial use allowed, royalty-free), so you are in control and you are fully independent if you want to
  • A very experienced team that has already successfully migrated many SL and WPF applications
  • A fixed cost (no extras, no surprises) and many milestones with intermediate deliveries

To get an estimate for the work needed and cost, please contact us at: sales@cshtml5.com - Usually we start by signing an NDA, then you send us your source code, we analyze it, and we send you a proposal that contains the cost, the schedule, the deliverables, and the terms.

Note: please know that, due to the high number of demands that we are currently receiving, our team's availability varies. The sooner you contact us, the sooner we can guarantee the capacity and allocate the resources for your migration project.

 

Can I do the migration by myself?

Yes, you can also do the migration by yourself by purchasing the CSHTML5 Migration Edition and following this step-by-step tutorial. You can either do the migration entirely on your own, or you can get some assistance from us. As we are very flexible, you can choose the level of assistance that best suits your needs. For example, you can have meetings with us on a regular basis, or you can have us do some specific developments, or you can hire us to do the whole migration (cf. previous question).

 

What if a feature is not supported?

- If you do the migration on your own, when a feature is not supported, you have the choice to:

  • either work around it in the source code of your application (in C#/XAML)
  • or use an existing C# library
  • or use an existing JavaScript library (cf. "importing typescript definitions")
  • or implement it in JavaScript (cf. "How to call JavaScript from C#")
  • or implement it in CSHTML5 (you have access to the full source code)
  • or hire us to implement the feature for you (contact us and we will quickly send you a quote)

- If you hire us to do the full migration, we take care of implementing all the workarounds in your application, and every time that we make a change to your source code, we mark it with a "#if CSHTML5" compiler directive, so that you can easily track it and see what has been modified.

 

If we are still coding in C# and XAML, and CSHTML5 compiles it to HTML5, then what happens to our code base in C#/XAML when Silverlight goes end of life?

After the migration you won't be coding in Silverlight or WPF any longer, but rather in .NET Standard, C#, and XAML (Note: a standard for XAML is in the works by Microsoft and will be supported by CSHTML5 as soon as it is ready), so your code base will become completely independent from Silverlight or WPF, and mostly compatible with the many other .NET Standard-based technologies and platforms.

While in the short term you will keep using CSHTML5 to compile your code to HTML5 - note that you do have access to the full source code of CSHTML5 so you are fully independent -, in the longer term you will be able to choose between a variety of alternative compilers. Microsoft itself is working on an open-source C# to WebAssembly compiler (cf. the Mono WASM repository), which by the way we plan to support in CSHTML5 as soon as it is ready.

Feel free to contact us if you have any questions.

 

How does the application come back to us in terms of the GUI?

The converted application GUI comes back very similar to the original one. By default, to ensure the best performance, basic controls such as buttons have flat styles (ie. they have a uniform background rather than a LinearGradientBrush), but those are very minor changes, and it is possible to obtain almost the exact same GUI as the original application if needed. Only third-party controls may render slightly differently depending on which JS libraries are used to replace them (read below, or contact us for more information).

After the conversion, you will be able to adjust the GUI. In fact, the source code is delivered to you in the form of a Visual Studio solution that contains only C# and XAML files (very similar to your original application), so you will be familiar with it and you will be able to adjust the GUI to suit your needs. You will then be able to make new versions by simply modifying the C# and XAML code and recompiling.

 

How do you handle the migration of Telerik, Devexpress, Infragistics, Syncfusion, ComponentOne, and other third-party controls?

We handle them by implementing simple lightweight "adapter" projects that redirect the calls from the original third-party Silverlight or WPF suite of controls to a JavaScript-based implementation.

For example, the calls to the "Telerik UI for Silverlight" controls are usually mapped to the "Telerik Kendo UI for jQuery" controls. Your C#/XAML code remains unchanged but the underlying implementation is rendered via "Telerik Kendo UI for jQuery" instead of "Telerik UI for Silverlight".

Even though the functionality of a third-party control can be huge (take the Syncfusion Spreadsheet control for example), it often requires only very few lines of code to make it available to the migrated application, so this "adapters" approach can be really powerful and cost-effective.

To implement the "adapter" projects, we leverage the two following automated tools:

  • A build-in feature of CSHTML5 that enables developers to automatically generate C# wrappers from the "TypeScript Definitions" of JavaScript libraries, such as "Telerik Kendo UI for jQuery", so that the library can be accessed in a strongly-typed way from C#.
  • An internal tool that is able to analyze your application code to identify which classes and methods are used, and then automatically extract the public signature of those methods to generate empty proxy classes.

We then finish the work by manually mapping each used feature.

Regardless of whether you hire us to do the full migration of your application or only to implement those "adapter" projects, we deliver to you the full source code of those projects, as well as the tools that were involved in their generation.

Please note that you will need a valid license for the third-party JavaScript controls that you will use in your migrated application. For example, if we map "Telerik UI for Silverlight" to "Telerik Kendo UI for jQuery", you will need to obtain a license from Telerik for the "Kendo UI for jQuery" suite of controls.

Feel free to contact us for any questions.

 

How to get started?

To get an estimate for the work needed and cost, please contact us at: sales@cshtml5.com - Usually we start by signing an NDA, then you send us your source code, we analyze it, and we send you a proposal.

Note: please know that, due to the high number of demands that we are currently receiving, our team's availability varies. The sooner you let us know about your migration project, the sooner we can allocate resources to help you.