本文介绍了浏览器中的主机WPF窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Web浏览器中的托管WPF窗口能否以复制和粘贴方式访问客户端的剪贴板?有没有人试图在ASP.NET MVC 3应用程序中托管WPF窗口?

Can an hosted WPF window in the web browser access the client's clipboard in both copy and paste? Has anybody tried to host a WPF window inside a ASP.NET MVC 3 application?

尽管仍在寻找支持双向MS Excel复制/粘贴和内联编辑的ASP.NET MVC的高级网格(请参阅问题:).

While still looking for an advanced grid for ASP.NET MVC which supports two-ways MS Excel copy/paste and inline editing ( see question: Excel type of input sheet that allows new cols to be added ).

我开始认为最终我可以在Web应用程序中托管WPF窗口,但我不确定100%是否可以完全访问用户剪贴板.

I start thinking that eventually I could host a WPF window in the web application but I am not 100% sure if such WPF form will have full access to the user clipboard.

我们的Web应用程序将包含许多页面,这不会影响所有页面;只有某些用户期望该功能的特定页面最终会包含带有高级网格的嵌入式/托管WPF窗口.

Our web application will have many pages and this will not affect all of them; only some specific pages where users are expecting this feature will eventually contain the embedded/hosted WPF window with an advanced grid.

一个很好的例子是Google文档,其中没有WPF,没有任何插件或activeX,您可以完全按照我们的需要进行内联编辑和剪贴板,这很麻烦.

Quite an example is Google docs where without WPF, without any plugin or activeX you get inline editing and clipboard two wasy exactly as we also need.

...还是我应该告诉用户粘贴到Google文档中,然后通过GDocs API连接到该Google文件并获取粘贴的内容?:D

... or should I tell the user to paste into google docs and then I connect to that google file via GDocs APIs and grab the pasted content? :D

推荐答案

WPF窗口是不可能的.但是WPF用户控件或视图是可能的...

A WPF window is not possible. But WPF user controls or views are possible ...

您有3个选择

  1. XBAP
  2. 在浏览器外的Silverlight(寂寞的弹出式应用程序)
  3. 宽松的XAML

http://msdn.microsoft.com/en-us/library/aa480223.aspx#wpfandwbas_topic6

这篇关于浏览器中的主机WPF窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 05:30