I need to convert a project wpf application c# to a web application c#. So I would like to know if tools exist to convert xaml to xml?
-
15XAML *is* XML. You need to be more specific. What XML format to you want to convert XAML to? XHTML? That's not possible. – Daniel Hilgarth May 02 '13 at 10:23
-
You should provide schema, dtd or at least a sample xml file you want to transform. – Toan Vo May 02 '13 at 10:23
-
1You can build your own tool using xslt – Joel May 02 '13 at 10:24
-
I created a WPF application and to run on desktop and now I need to create the same application to run in a browser. – Steph18 May 02 '13 at 10:25
-
1You can use most of your XAML in silverlight. – Davut Gürbüz May 02 '13 at 10:30
-
If you're OK with limiting it for Internet Explorer only (and likely only for internal/personal use), you can deploy it as an [XBAP application](http://msdn.microsoft.com/en-us/library/aa970060.aspx) almost out-of-the-box. – Chris Sinclair May 02 '13 at 10:32
-
You can publish your WPF application as a XABP application. Have you tried it? – Luis Filipe May 02 '13 at 10:41
4 Answers
I would advice you to do the opposite to what someone posted.
MSFT is not deprecating silverlight. Silverlight is mature enough and fortunalelly it will stay with us for a long time, and it has its own market niches (intranets), windows forms is still among us ;)
As someone commented here earlier on, you can reuse WPF in web if that is what you want:
XAML is a format based upon XML. So that is a non issue.
What it sounds like you're trying to do is re-use your existing XAML for a web application, unfortunately that leaves you with only two options:
- Convert it to a Silverlight application (which Microsoft is all-but deprecating)
- Throw away your XAML and rewrite your application frontend using HTML5 and Javascript.
There are some tools that can convert XAML to SVG which can be embedded in HTML, but that won't get you massively far by itself.

- 13,486
- 4
- 43
- 62
-
1
-
IE10 in Windows 8 doesn't support Silverlight. I'd pretty much call that on the way to be deprecated. – PhonicUK May 02 '13 at 10:37
-
@Like I said Silverlight as a solid niche among corporate intranets for many years to come, and fortunately bushiness are not migrating to windows 8, if ever, for many years to come. – MeTitus May 02 '13 at 10:40
-
OP didn't specify that it was for intranet or private use, so the safer assumption is to guide them towards more widely available technologies. If they'd said it was for intranet or private use I'd be more inclined to agree. None of this makes my answer 'wrong', just different to yours. The votes are not for 'agree' or 'disagree'. – PhonicUK May 02 '13 at 10:41
-
"Are browser plugins, such as Silverlight, supported in Internet Explorer 10? Internet Explorer provides an add-on–free experience, so browser plugins don't load and dependent content isn't displayed. However, Internet Explorer for the desktop does support browser plugins, including ActiveX controls such as Adobe Flash and Microsoft Silverlight. See the IE blog, Browsing Without Plug-ins, for more information." http://technet.microsoft.com/en-us/library/hh846773.aspx. I wonder where you got that from. – MeTitus May 02 '13 at 10:43
-
Ok, I removed my vote, but I still don't agree with what you said, nor do I see your post giving the best guidance to what the OP is asking. – MeTitus May 02 '13 at 10:45
-
The 'modern ui' IE 10 doesn't allow silverlight, only the 'desktop' version (even if you're on a desktop version of 8 instead of the tablet RT version) – PhonicUK May 02 '13 at 10:47
WPF applications can also be deployed as standalone desktop programs, or hosted as an embedded object in a website. Source: Wikipedia: WPF
The answer to your Question is: You don't need to transform your application because the functionality to run as a web application comes out of the box.

- 4,862
- 7
- 46
- 71
Thanks correct. You can deploy your WPF application on web. The extension of the file will be .Xbap

- 81
- 2
- 10