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?
问题:
回答1:
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:
Use WPF Controls in Web project
回答2:
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.
回答3:
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:
Thanks correct. You can deploy your WPF application on web. The extension of the file will be .Xbap