wpf可以在linux下运行吗,Linux上的WPF(已經)可行嗎?

I love programming with .NET, especially C# 3.0, .NET 3.5 and WPF. But what I especially like is that with Mono .NET is really platform-independent.

我喜歡用。net編程,尤其是c# 3.0,。net 3.5和WPF。但我特別喜歡的是,Mono . net實際上是獨立於平台的。

Now I heard about the Olive Project in Mono. I couldn't find some kind of Beta.

現在我聽說了Mono的橄欖項目。我找不到某種貝塔。

Does it already work? Have any of you made any experiences with it?

它已經工作了嗎?你們有誰用過它嗎?

Edit: I know about Moonlight. But I want a standalone WPF application. And because of Moonlight I hope WPF on Linux will become true.

編輯:我知道月光。但是我想要一個獨立的WPF應用程序。因為月光,我希望Linux上的WPF能夠實現。

8 个解决方案

#1

21

You'll have better luck working with Moonlight, which targets the Silverlight API, which is a subset of full WPF.

在使用Moonlight時,你會有更好的運氣,它的目標是Silverlight API,它是完整WPF的一個子集。

edit: Sure, Silverlight isn't "intended" for the desktop, but there's no reason why you can't embed a silverlight engine in your application. It's been done before, such as for the Mac NY Times Reader

編輯:當然,Silverlight不是為桌面設計的,但是你沒有理由不能在你的應用程序中嵌入Silverlight引擎。這是以前做過的,比如Mac NY Times Reader

更多編輯:見Miguel在獨立Silverlight應用上的帖子。

#2

12

Mono is in a bit of an uncomfortable position when it comes to Microsoft APIs such as Winforms and WPF. A subset of the .Net technology is an ECMA standard, but free implementations of these APIs are probably on shakier legal ground. I believe this was a large factor in the covenant between Novell and Microsoft, which is good for Novell customers. But people who use Mono that aren't customers of Novell aren't protected. For this reason a lot of people in the F/OSS community look askance at Mono despite its technical merits.

當涉及到Winforms和WPF等Microsoft api時,Mono的處境有點尷尬。. net技術的一個子集是ECMA標准,但是這些api的免費實現可能基於不穩定的法律基礎。我相信這是Novell和微軟之間的契約的一個重要因素,這對Novell客戶來說是好事。但是那些使用Mono而不是Novell客戶的人是不受保護的。由於這個原因,F/OSS社區中的許多人對Mono持懷疑態度,盡管它有技術優點。

For this reason, Gtk# will always be preferred, since it is truly Free. Many people consider it to be superior to Winforms anyway. As far as WPF is concerned, it will almost certainly be a low priority for Novell. They may implement it eventually, but I would expect Moonlight to be the closest you could get for the forseeable future.

由於這個原因,Gtk#將永遠是首選,因為它是真正免費的。許多人認為它比Winforms優越。就WPF而言,它幾乎肯定是Novell的低優先級。他們可能最終會實現它,但我希望月光是你能得到的最接近可預見未來的東西。

Since posting this, Microsoft has extended their covenant to anybody who implements the ECMA 334 & 335 standards.

自從發布這篇文章以來,微軟已經將他們的契約擴展到任何執行ECMA 334和335標准的人。

#3

7

mono的網站

At this point, the Mono project does not have plans to implement Windows Presentation Foundation APIs as part of the project.

此時,Mono項目沒有計划將Windows Presentation Foundation api作為項目的一部分來實現。

Moonlight is an implementation of silverlight, which is a browser based flash like technology based on a subset of WPF.

Moonlight是silverlight的實現,silverlight是基於WPF子集的基於瀏覽器的flash技術。

In my opinion the choice to not implement WPF is monos biggest mistake. As WPF is fast becoming the default choice for new .net user interfaces. See this blog for more.

在我看來,選擇不執行WPF是monos最大的錯誤。由於WPF正迅速成為新的。net用戶界面的默認選擇。更多信息請參見本博客。

#4

3

There is a library called Silverform SDK that aims to provide cross-platform WPF and Silverlight implementation.

有一個名為Silverform SDK的庫,旨在提供跨平台的WPF和Silverlight實現。

The library is implemented in managed code and currently works with OpenTK and Unity3D as render backends. Major functionality, such as binding, layout, main controls and primitives, has already been implemented (check Unity web player demos here). Initially it has been focused on Unity3d render, while support for standalone Mono applications will be added as a separate build in the future.

庫是在托管代碼中實現的,目前使用OpenTK和Unity3D作為渲染后端。主要功能,如綁定、布局、主控件和原語,已經實現(請參閱Unity web player演示)。最初,它一直專注於Unity3d渲染,而對於獨立的Mono應用程序的支持將在將來作為單獨的構建添加。

Disclaimer: I am one of the developers of the library.

免責聲明:我是圖書館的開發者之一。

#5

3

If you check Known bugs of this link(also includes steps needed to install .NET onto Ubuntu)or this you may find that some(may be buggy) version of WPF works on Wine as for now. I did not find any definite test done as for now, but worth to try to run WPF "Hello world".

如果您檢查這個鏈接的已知bug(也包括將。net安裝到Ubuntu上所需的步驟),或者您可能會發現WPF的一些(可能是錯誤的)版本仍然適用於Wine。目前我沒有發現任何確定的測試,但是值得嘗試運行WPF“Hello world”。

UPDATE2:

更新2:

I have run latest IlSpy on latest Wine for Ubuntu 16.04. With 32 bit version of dotnet45 and corefonts installed via winetricks with windows 7 compatibility.

我為Ubuntu 16.04運行了最新的IlSpy最新的葡萄酒。有32位版本的dotnet45和corefonts安裝通過winetricks與windows 7兼容。

For this time no crashes and all things work fine. Fonts look really good.

這段時間沒有崩潰,一切正常。字體看起來很好。

IlSpy is shown via WPF and for person who loves programming with .NET is essential tool - the decompiler.

IlSpy是通過WPF來展示的,對於那些喜歡使用。net編程的人來說是必不可少的工具——反編譯器。

I downloaded latest portable SharpDevelop(build using WPF) with no extra. It started. Failed to create WPF project. Created WinForms. After opening some cs files and evidencing some glitches, tried to type - and it crashed.

我下載了最新的便攜式sharpdevelopment(使用WPF構建),沒有多余的資源。它開始。創建WPF項目失敗。WinForms創建。在打開一些cs文件並證明有一些小故障后,嘗試輸入-然后它就崩潰了。

aHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS90d0tGOC5wbmc=

UPDATE

更新

I followed steps and got latest ILSpy.exe running on Ubuntu 14.4.

我走了幾步,找到了最新的間諜。exe運行在Ubuntu 14.4上。

aHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS8wd0NoQy5wbmc=

Next items to note:

下一個項目需要注意:

wine stated that dotnet40 is not supported by 64 configuration, changed to 32 bit

wine聲明dotnet40不支持64位配置,改為32位

fonts are ugly, but readable

字體很難看,但可讀性強。

basic functional works fine - I can see decompiled code - which is good enough for some development, but View -> Search and View -> Options -> Display crash.

基本的功能工作得很好——我可以看到反編譯代碼——這對於一些開發來說已經足夠了,但是視圖——>搜索和視圖——>選項——>顯示崩潰。

Conclusion:

結論:

WPF on Linux is possible. But need some way to tackle issues.

Linux上的WPF是可行的。但需要一些解決問題的方法。

#6

2

From the Olive home page:

橄欖樹主頁:

Olive is unsupported, should be considered as experimental software, and since it implements a shifting API there are no guarantees of any kind about the stability of the API.

Olive是不支持的,應該被認為是實驗軟件,而且由於它實現了一個移動的API,所以對API的穩定性沒有任何保證。

I doubt anyone would have used it in a real project.

我懷疑是否有人會在真正的項目中使用它。

#7

2

Yes, it is possible using NoesisGUI a real-time multi-platform XAML implementation. There are a few games already released using this technology in Linux, like VoidExpanse

是的,使用NoesisGUI實現實時多平台XAML是可能的。有一些游戲已經在Linux中使用了這種技術,比如VoidExpanse

Disclosure: I am one of the developers of this product.

我是這個產品的開發者之一。

#8

0

I heard a podcast interviewing miguel de icaza (the mono lead) maybe a few weeks ago, so that would have been maybe mid-december 2008, and he said that they had no WPF support at all yet.

我在幾周前聽了一個播客采訪米格爾·德·伊卡薩(mono lead),所以可能是2008年12月中旬,他說他們還沒有WPF的支持。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值