WPF XAML 浏览器应用程序 (XBAP) 是否适用于 Android 和 Windows Phone 浏览器?有哪些替代方案?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24100526/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 11:51:41  来源:igfitidea点击:

Is WPF XAML Browser Application (XBAP) works on Android and Windows Phone browsers? What are the alternatives?

android.netwpfwindows-phone-8xbap

提问by Yoda

I want to create simple CRM website for my small company. Thanks to people on stackoverflow I assume that I can use WPF XAML Browser Application (XBAP):

我想为我的小公司创建简单的 CRM 网站。感谢 stackoverflow 上的人们,我假设我可以使用 WPF XAML 浏览器应用程序 (XBAP):

Does WPF XAML Browser Application (XBAP) work on Android and Windows Phone browsers? Is it suppose to be deployed on a server/cloud and then it does not matter what device, internet browser, operating system you use?

WPF XAML 浏览器应用程序 (XBAP) 是否适用于 Android 和 Windows Phone 浏览器?它是否假设部署在服务器/云上,然后您使用什么设备、互联网浏览器、操作系统都无关紧要?

This is the technology I am talking about: http://msdn.microsoft.com/en-us/library/aa970060%28v=vs.110%29.aspx

这就是我说的技术:http: //msdn.microsoft.com/en-us/library/aa970060%28v=vs.110%29.aspx

If not, do I have any alternatives involving .NET?

如果没有,我是否有任何涉及 .NET 的替代方案?



EDITXamaring seems tempting but I am afraid that it is too hard for me.

编辑Xamaring 看起来很诱人,但我担心这对我来说太难了。

  1. Is it possible to write one applciation in Xamarin and run it on Windows and Android without any changes?
  2. If we are talking about ASP .NET is the website written in ASP ,BET will have full functionallity(buttons, textfields) on Android phone?
  1. 是否可以在 Xamarin 中编写一个应用程序并在不进行任何更改的情况下在 Windows 和 Android 上运行它?
  2. 如果我们谈论 ASP .NET 是用 ASP 编写的网站,那么 BET 在 Android 手机上是否具有完整的功能(按钮、文本字段)?

回答by Federico Berasategui

Does WPF XAML Browser Application (XBAP) work on Android and Windows Phone browsers?

WPF XAML 浏览器应用程序 (XBAP) 是否适用于 Android 和 Windows Phone 浏览器?

No.

不。

XBAP is really a HACK to make WPF applications "seem" like they're "web apps" by running them inside Internet Explorer. It does NOT support any other browsers (Chrome, Mozilla, etc) and it does NOT run in mobile devices. It requires the full .Net Framework installed in the target machine and thus it is only runnable in devices which support the full .Net Framework (Windows PC, Notebooks and Tablets with the full version of Windows (NOT RT).

XBAP 确实是一种 HACK,通过在Internet Explorer 中运行 WPF 应用程序,使它们“看起来”像“网络应用程序” 。它不支持任何其他浏览器(Chrome、Mozilla 等),也不能在移动设备上运行。它需要在目标机器上安装完整的 .Net Framework,因此它只能在支持完整 .Net Framework 的设备上运行(Windows PC、笔记本电脑和带有完整版 Windows(非 RT)的平板电脑)。

A Web application consists of a Web Serverthat processes Web Requestsand delivers Web Content(consisting of HTML[and optionally CSS and JavaScript]) to Web Clients(HTML-enabled devices and applications such as PCs, NoteBooks, Tablets, SmartPhones).

Web 应用程序由 处理Web 请求并将Web 内容(由HTML[以及可选的 CSS 和 JavaScript] 组成)传送到Web 客户端(支持 HTML 的设备和应用程序,例如 PC、笔记本、平板电脑、智能手机)的Web 服务器组成。

Anything that does not deliver Web Content(consisting of HTML) is NOT a Web technology and should NOT be used to build Web Applications.

任何不提供Web 内容(由HTML组成)的东西都不是 Web 技术,不应用于构建 Web 应用程序。

What are the alternatives?

有哪些替代方案?

If you need to build a Web Application, then use standard Web technologies, such as ASP.Net.

如果您需要构建 Web 应用程序,请使用标准 Web 技术,例如ASP.Net

If you need specialized capabilities in different devices, you can build a Web-Service based API and then create specific clients for each platform. Xamarinis a technology that allows you to do this using C# and a common code base for different mobile targets, which can also be shared in the form of PCLs with Windows Applications (WPF).

如果您需要不同设备的专门功能,您可以构建基于 Web 服务的 API,然后为每个平台创建特定的客户端。Xamarin是一种技术,允许您使用 C# 和不同移动目标的通用代码库来执行此操作,也可以以 PCL 的形式与 Windows 应用程序 (WPF) 共享。