Is it possible to call a Windows Forms Keyboard in a Silverlight Web Application? - winforms

I need a multilingual Keyboard for my Silverlight WebApplication. I have now written it with Windows.Forms and Sendkeys. It works fine.
Now the problem is that I want to call it inside from the Silverlight WebApplication with a Click Function on a Textbox or a button so when its pressed the Keyboard pops up. I thought about running the Windows.Forms Application in the Background and tried to FindWindow() with Silverlight but it did not work at all.

I am not sure about using winform. But, you can use win32 methods (so, I guess Winforms too) in Silverlight 5 using PInvoke

Related

Use Windows UIAutomation to tap on WPF TextBox

My WPF Windows Desktop application is with touch support - so when I tap on TextBox the keyboard pops up.
I'm trying to write a test using Windows UIAutomation for my WPF application.
I want to "tap" on TextBox using UIAutomation and check if the screen keyboard actually pops up.
How can I do it? I don't want to use WinAPI for that.
Thank you!
Seems like UIAutomation has no ability to tap/use touch.
We will use WinAPI do to that (already tested, it works). The solution can be found here:
https://github.com/GuOrg/Gu.Wpf.UiAutomation/blob/c0109f39062e254b3eae40275730f0e9f7efce6e/Gu.Wpf.UiAutomation/Input/Touch.cs

Can I use silverlight application in wpf application?

I got a silverlight sample from http://gallery.expression.microsoft.com/ like the analog clock and the progress bar. I am making a wpf desktop application using microsoft blend 4. My problem is how to put/run/embed the sample in my wpf application using the blend 4.
I choose wpf application because I can add windows/form and the codes are almost the same with the windows application form.
and if silverlight is not possible to run in wpf application, can you suggest how to do layered controls? My plan is to run first the loading bar. and then hide it to show the main menu and the analog clock.
Silverlight is very-very-very compact version of WPF functionality.
You can just rewrite sample to WPF and it will run more efficient.
Silverlight is just like adobe flex which helps in making(running) web browser apps..
If you use silverlight in your wpf application , then you have to use webbrowser control..
For knowledge:
When we want to try to bring wpf for webbrowser apps we use silverlight..
& doing vice versa(like you are doing), don't make much sense..

WPF Component in Windows Application

i have created one component in WPF. its working fine with WPF but when i tried to use it in windows application i am getting one issue.
i have one textbox in that control so in when the control hosted in windows applicaion and i try to type something in that textbox its not working.
i tried to put some messageboxes in "KeyPreview", "KeyDown" and "Textxchanged" events any of these events have not been fired.
so is there any limitation for WPF usercontrols usage in windows application??
one more thing i have used Dispatcher timer in the usercontrol.
This MSDN walkthrough shows how to use a WPF user control in Windows Forms. It may help you in your query.
http://msdn.microsoft.com/en-us/library/ms745781.aspx

Opening WPF form from VB6 app always loses focus

I have a WPF DLL containing a few forms I'm trying to call from a VB6 app. I've got most of the interop figured out. I can open the forms fine and for the most part they work fine. They operate on their own and don't need to communicate with the VB6 app. The problem I'm running into is that when the WPF forms open the first time I hit tab, focus immediately jumos back to my VB6 app. It seems that the VB6 app still thinks it has focus and tries to do something with the tab key. I've been hacking around for hours and nothing seems to work. Has anyone run into this and how can I get around it? Opening my WPF DLL from a WinForms app works fine.
Get the hWnd of the WPF form and set focus to it.
Use GetHandleFromPartialCaption and SetForegroundWindow

Wpf popups or modal windows as user entry screens?

I am building an application which has multiple user entry screens. I would like to know if there are advantages/disadvantages of using wpf popups rather than modal windows?
I am using mvvm-light.
I have noticed that popups are being used extensively in touch applications (eg iPad).
The issue is really one of Desktop vs. Web applications. Popups in Silverlight (or other touch apps) involve having only one real window to work with (the mobile surface, or the web browser). If you are writing a desktop app, then modal windows will probably match user expectations better as Popups cannot leave the parent window.
pop ups are nice but are very difficult to control. In our apps we are using adorners to be 'pop-up' editors - we have created a control that can hold any other control and display it in the adorner layer of the main window. This allows to do things such as having 1 control appear next to another yet still have the other control in use or we can grey out the background and force focus to the new control and not allow any other control to be used until the 'ok' button is pressed. If you Google for adorners in wpf you will find a lot of excellent articles.

Resources