5/26/2023 0 Comments Silverlight for ipads![]() With CSHTML5, the transformation of a Silverlight/WPF app into HTML5/JavaScript is not a one-time irreversible operation where you would do a one-time transformation of your C#/XAML code into a set of HTML/JS files, then throw away the C#/XAML code, and keep working in HTML/JS. Keep reading for more information and a detailed tutorial. Furthermore, the produced files are self-contained - meaning that they have no dependencies - which means that they can be redistributed very easily, or deployed to any server (read the section below about deployment). Those files are auto-generated, so you are not expected to modify them manually (read the section below titled " You keep coding in C#/XAML"). You then patch the code until it compiles and runs fine,Īnd then, every time you build the CSHTML5 project, the compiler generates the final cross-platform HTML and JavaScript files. Please note that a lot of manual work is still required to migrate a Silverlight application. ![]() It can be launched from the Tools menu of Visual Studio. UPDATE: a "Silverlight Migration Wizard" is now available to help you create the projects and copy the files. You then copy all your C#/XAML files from your Silverlight/WPF project into the new CSHTML5 project, You start by creating a new empty "CSHTML5 Project", Therefore, the general idea for migrating a Silverlight/WPF application into cross-platform HTML5 is the following: The main difference between a Silverlight/WPF project and a CSHTML5 project is that the Silverlight project outputs a "XAP" file (or "EXE" file in case of WPF), whereas the CSHTML5 project outputs HTML and JavaScript files. For example, a blank new CSHTML5 project is almost identical to a blank new Silverlight/WPF project: it contains App.xaml,, MainPage.xaml, and. This new kind of project is called a "CSHTML5 Project".Ī CSHTML5 project is very similar to a Silverlight/WPF project, in that it contains mainly C# and XAML files. What is " C#/XAML for HTML5" exactly, and how does the migration workĬ#/XAML for HTML5 (also called "CSHTML5") is an extension for Visual Studio that adds a new kind of project to the "New Project" dialog. Your apps run on any modern browser, without the user installing any plugins, and you can even package them for deployment on iOS and Android via PhoneGap/Cordova, as well as other devices such as Chromebooks, Macs, and Linux-based devices. In fact, C#/XAML for HTML5 is the only solution that lets you reuse most of your SL code, keep coding in a Silverlight-like way, and at the same time generate cross-platform HTML5-based apps. However, if you want your app to run in the browser, or if you want to reach more platforms, you will likely find C#/XAML for HTML5 a compelling choice. If your app targets only Windows-based devices, and if deployment is not an issue for you, you may consider migrating your application to WPF or UWP. In fact, Chrome, Edge, and mobile browsers have stopped supporting it long ago, and FireFox has also stopped supporting it in March 2017. ![]() ![]() If you have a Silverlight application, chances are that you are looking for a way to migrate it to other technologies. Main steps for migrating a Silverlight/WPF application Differences between a Silverlight/WPF project and a CSHTML5 project What is "C#/XAML for HTML5" exactly and how does the migration work Alternatively, you can hire us to do the full migration for you, and save on licensing costs and more. Note: This page is for "do-it-yourself" migrations. Manually Migrate Silverlight/WPF apps to HTML5 using CSHTML5 ![]()
0 Comments
Leave a Reply. |