再用iPad上的C#-Project [英] Reuse C#-Project on iPad

查看:2067
本文介绍了再用iPad上的C#-Project的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图端口一个现有的C#-WPF项目作为一个iPad应用程序内。

I am trying to port an existing C#-WPF-Project as an iPad-App.

至于我发现到现在,最好的办法去是使用 MonoTouch的和重用尽可能多的C#编辑逻辑越好。

As far as I found out by now, the best way to go would be to use MonoTouch and reuse as much C#-Logic as possible.

由于原来的项目用WPF写一个实际的TabletPC,我的问题是,如果有任何的方式,重复使用WPF的来源,或者至少我必须重新编写部分减少。

As the original project is written with WPF for an actual TabletPC, my question is, if there is any way, to reuse the WPF-sources or at least minimize the part I have to write again.

如果有什么好的办法来MonoTouch的,我将不胜感激提示过:)

If there are any good alternatives to MonoTouch, I would appreciate tips too :)

更新:你的意见是有益的,但不是100%我一直在寻找。 MonoCross 看起来不错,但据我了解,这只是隐藏的iOS特定的部分。我更喜欢,会重用手写的特殊WPF的控制的一种方式。 。(或者至少是减轻工作/时间将他们转移)这将是真棒

UPDATE: Your comments were helpful, but are not 100% what I was looking for. MonoCross looks nice, but as far as I understand, it just "hides" the iOS-specific part. What I would really love, would be a way to reuse the handwritten "special" WPF-Controls. (Or at least minimize the work/time to transfer them.) This would be awesome.

更新2:也许我应该补充一点,我还要接受一些复杂的三步法。例如,有没有办法翻译的XAML的WPF的文件到HTML5(或一些同样强大的),然后使用的PhoneGap ?在语言和框架应该不是什么大问题,我只是试图找到一种方式来重复使用尽可能多的:)

UPDATE 2: Maybe I should add, that I would also accept some "complicated" three-step-technique. For example, is there a way to translate the XAML-WPF-files to HTML5 (or something equally powerful) and then use Titanium or PhoneGap? The Languages and Frameworks shouldn't be the big problem, I just try to find a way to reuse as much as possible :)

推荐答案

请参见这先前的问题这是相关的,可能是利息创建跨平台的iOS,Android和WP7的应用程序。

Please see this previous question which is related and may be of interest on creating cross-platform iOS, Android and WP7 applications.

在回答你的问题,没有就不可能再使用iPad上,IPhone,Android的WPF图形用户界面。只有Windows Phone将支持Silverlight的意见。要解决这一点,你必须在所有三个使用模型视图控制器架构(如iOS版,Android将不支持通过数据绑定MVVM),并为每一个单独的建筑美景。

In response to your question, no it is not possible to re-use WPF Guis on iPad, IPhone, Android. Only Windows Phone will support silverlight views. To workaround this you must use a Model View controller architecture (as iOS, Android won't support databinding via MVVM) on all three and create separate views for each architecture.

虽然这听起来费劲,请注意,如果您正确架构的应用程序,使关键业务逻辑和表示逻辑是在控制器内部(或服务)层,那么你就可以重复使用代码的相当大的比例。这是相同的限制,如果创建跨平台的代码,以双部署到Silverlight和WPF在Windows上的。 XAML文件往往要具体到每一个框架,但经常*的.cs用户控件和的ViewModels /代码逻辑都可以共享。

While this may sound laborious, please note that if you correctly architecture your application so that key business logic and presentation logic is inside the Controller (or services) layers then you can re-use a large proportion of your code. This is the same limitation as if you create cross-platform code to dual deploy to Silverlight and WPF on Windows. The Xaml files often have to be specific to each framework, however often *.cs user controls and viewmodels / code logic can be shared.

更新:追随你的更新(2)有问题。

是的,你可以使用第三方服务器XAML的WPF的文件转换为HTML5 - 的的 ComponentArt仪表板服务器。这号称翻译采用严格的MVVM到HTML5 / JS跨多个设备的便携性书面WPF / Silverlight应用程序。我不能保证效果如何,这是我知道它是昂贵的,但如果你是认真地卡住,想端口WPF - > HTML5那么它是值得研究这一点。

Yes, you can use a third party server to translate XAML-WPF-files to HTML5 - the ComponentArt Dashboard Server. This claims to translate WPF/Silverlight applications written using strict MVVM to HTML5/JS for portability across multiple devices. I can't vouch for how effective this is and I do know it is expensive, however if you are seriously stuck and want to port WPF -> HTML5 then it is worth investigating this.

最好的问候,

这篇关于再用iPad上的C#-Project的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆