Click here to Skip to main content
15,895,656 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I have a user control developed in WPF and I have to use it in ASP.NET page. Is it possible?

*Hint: Make assembly COM visible or something?

the requirement is to run the app on iPad, and as we know iPad will not support any installations and not supporting silverlight. any thoughts?

*Workaround may be installing virtual windows on iPad [parallels.com], but I am not happy.
Posted
Updated 13-Jul-11 14:56pm
v2

You MIGHT be able to put it in an ActiveX control, yes ( which is how you use COM to put something in a web page. Of course, your users then need to install .NET if htey don't have it. Have yo considered porting it to Silverlight instead ? I think the mechanism for downloading the plugin is probably more well defined.
 
Share this answer
 
Comments
derinpdavis 13-Jul-11 20:43pm    
Hi Chris, Its bit challenging because the requirement is to run the app on iPad, and as we know iPad will not support any installations and not supporting silverlight. Do you have some thoughts?
*Workaround may be installing virtual windows on iPad [parallels.com], but I am not happy.
Christian Graus 13-Jul-11 21:01pm    
OK, that is just plain going to be impossible then. I don't think you'll get WPF or Silverlight to run on the iPad. Nor will you get Flash. Parallels on a Mac does not support WPF with any great speed or accuracy, I stopped developing on Mac b/c I could not get a VM that ran my WPF app properly.
Essentially, no. ASP.net is simply serving up HTML (however much it tries to hide that from you) which gets rendered by the browser, and WPF controls are part of a rich desktop event-driven framework. The two are not compatible and you can't just embed desktop controls in a web page, whether they be WPF or WinForms.

(This is one of my main problems with ASP.net, it pretends so hard to be like a desktop app that it is confusing to use, and it also results in questions like yours because it has hidden the difference too well.)

As Christian says, WPF is very similar to Silverlight and with minimal porting you can get a WPF control to work with Silverlight, which is a browser plugin. But if Apple have said that their browser won't support Silverlight then that doesn't help.

The two options you have are:
- don't develop for iPad, wait for some tablets to hit the market which have a better browser; I'm sure a Chrome OS based one will support the Chrome Silverlight plugin, for example
- redevelop your user control as a web control so it can be run inline in a web page through ASP.net. Depending on what the control is, this may or may not be easy; making rich user controls work well through postback and client side Javascript/AJAX can be tricky.
 
Share this answer
 
Unfortunately, you can't run WPF applications (or parts thereof) on an iPad. Nor can you run Silverlight. I'm afraid your only option is to reimplement the code in something that will run on the iPad (such as HTML or Objective C).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900