I am trying to embed a WPF with multipoint mouse SDK registered inside the web browser using asp.net. I've tried to register the page instead of window but it seems like only enable to register only to window.
Can i have a WPF window with limited width and height inside the web browser ?
I'm still quite fresh in development so thanks and sorry if there's any relevant information or answer which have already been posted.
The short answer:
No, unless Multipoint 1.6 or higher came out.
This is a post from Microsoft on the an old Multipoint form.
"for 1.6 and we're intending to remove the active window dependency in this release. This will not only allow you to use it as you describe above, it will also allow people to create full trust XBaps which will allow you to use WPF directly without having to embed it in a Windows Forms host or a ClickOnce installer (behind the scenes XBap is just a WPF application in a clickonce host with a more automated installation process)."
This post was in 2010 and i haven't seen an updates other then 1.5 to 1.5.1 so i'm not sure if there project is still under active development. http://social.msdn.microsoft.com/Forums/en-NZ/mptgen/thread/e0891d93-6ad1-4977-b59c-3a5d5963ef8c
The long answer:
Multipoint SDK was not built to be web based. With that said this is how i went about it. I created a winform that was com exposed making it work as an activex control. If I remember right I had the native WPF window inside of that. The activex control communicated with the page through the com interface to the JavaScript with customer mouse events. There were many problems I ran into as Multipoint SDK was not designed for this. First, what do i do with real mouse? I just hid it and locked it, but then how do i get it back. So i have a button to activate it and deactivate it. Multipoint has to be the active window to work and that is why i embedded it into the activex control on the same page. When a new page loaded the real mouse was free and all the mice controlled it, until the next page loaded. In short it was hard to use for the user and I i only used Multipoint SDK for our first few versions.
Multipoint SDK almost worked perfect, but we just wanted a few features that we could not get working with it. This is when we had to remake our plug-in as we hit limitations in the current build of Multipoint SDK. The main one being the ability to work in all browsers and the offline out of browser support for Silverlight. ActitiveX would not work with these. The plug-in had to be separate. The problem is Multipoint only work if it is the active window. Also the activex solution with multipoint was buggy and not user friendly. Later we wanted the support to control the real mouse with one of the mice and not all. In each of these scenarios Multipoint almost work perfect and was the cleanest solution.
So in short the current version of mymousegames.com does not use multipoint but rather a customer built raw mouse handler. The plug-in has been made to work on all browsers. The way it works now is by filtering raw mouse input and sending it to Silverlight via sockets. This solution is much more flexible than the activex version. The plug-in is deployed with Click Once which feels more web based. In my eyes it is not quite a web based because it is requires an application running on their computer, but to the average user it feels very web based and that all that matters.
I'm hoping in the next release there is a flag to receive mouse input while inactive. Then I can pull out my custom code and have a nice clean core for the plug-in. To build a custom raw mouse handler I looked at sample on the internet. RawinputSharp was a very helpful as well as multi-touch Vista as a module to use multiple mice to simulate multi touch.
So my advice would be wait until the next release which I believed to be coming soon and build a plug-in that talks to Silverlight or flash via sockets or create an activex control and communicate though JavaScript. Or just create a WPF application and deploy with Click Once which feels very web based.
This is a post from Microsoft on the an old Multipoint form.
"for 1.6 and we're intending to remove the active window dependency in this release. This will not only allow you to use it as you describe above, it will also allow people to create full trust XBaps which will allow you to use WPF directly without having to embed it in a Windows Forms host or a ClickOnce installer (behind the scenes XBap is just a WPF application in a clickonce host with a more automated installation process)." This post was in 2010 and i havent seen an updated version other then 1.5 to 1.5.1 so i'm not sure if there project is still under active development. http://social.msdn.microsoft.com/Forums/en-NZ/mptgen/thread/e0891d93-6ad1-4977-b59c-3a5d5963ef8c