Send text into textbox loaded in a website inside WebView - c#

I have a WebView and it can load a website, say http://www.google.com. Suppose the website has a textbox and when I click/touch it, the default Windows Touch Keyboard springs up.
I don't want to use the default keyboard as I'm creating my own custom keyboard. What I want is for the characters entered in my custom keyboard (implemented in the same UserControl along with the WebView) to send the entered characters into the currently selected textbox of a webpage loaded inside the WebView.
How would I go about doing this ?

If y want insetr text into some HTML element (input,textarea,etc), you may to use DOM and property innerHTML

You can't override the default behavior of input elements in Windows Store apps, including Web apps hosted inside WebView. There are no APIs for custom keyboards in Store apps, and you will not be able to prevent the keyboard from popping up at when a text-based input element is focused.

Related

Capture all Keyboard input, regardless of what control has focus in Windows Form applicaion

We are using the windows form application on a tough pad (touchscreen device).
want to show the on screen key board when user click the text box or any input control , rather then handling this event is there any way to handle this on the application level to show and hide the windows on screen keyboard
DevExpress editors, as well as regular .NET editors, do not affect OnScreenKeyboard's behavior. I suggest that you use one of the approaches described here to display it - Automatically pop up tablet touch keyboard on WinForms input focus.

Capture an event when windows form pages switches

I want to capture event when form in windows application using c# library
when application switches its page by clicking on next button or search buttons or any other means
Edit
I want to capture events generated by control tabs from library.
Please refer this link,,It shows events that is generated by control tabs.
https://msdn.microsoft.com/en-us/library/system.windows.forms.tabcontrol.selected(v=vs.110).aspx
You probably want to capture the Deactivated event of the Window.

How to make webview produce cursor (pull up keyboard) by tapping any place inside webview xaml?

I embedded webview in my UWP app to present information and allows user to edit it, however in the phone I found that it will pull up the input keyboard and cursor only by typing the first line when there is one line content or no content, I'm wondering how to allow user type anywhere in the webview to pull up keyboard and show the cursor.

Customized virtual keyboard for Windows Store App

Since Microsoft doesn't allow to replace the system's virtual keyboard, I've developed a custom virtual keyboard as a UserControl to be used inside my Windows Store App. My current problem is that the default virtual keyboard always pops up whenever a user taps a TextBox.
I've been searching for a solution to this problem since yesterday, but I couldn't solve it. My almost successful attempt was developing a TextBox with a transparent Canvas over it. When the user taps the Canvas, the focus is programatically transferred to the TextBox and my custom virtual keyboard is instantiated. However, if no physical keyboard is connected to the tablet, the system keyboard also pops up with this approach (over my custom keyboard).
The main reason why I want to use a TextBox is because that way I can preserve and use the already implemented caret function, but it is not mandatory.
Any input will be helpful, thanks.
There are a couple of things you could do:
There are events for when the keyboard shows up, check those and see if you can prevent it.
You could implement a custom TextBox that suppresses OnPointerPressed event so that the TextBox is never focused. There are a couple of other things you'll need to do (such as prevent tabbing into it giving focus by setting IsTabStop=false.
You could implement a custom TextBox from the ground up (that looks and acts like a TextBox).
I think the second option is the easiest and most interesting option to try.
Edit: You could also give your TextBox a DependencyProperty that you set the current Page to via bindings. In the TextBox's OnGotFocus event, set the visual state to "CustomFocus" (or whatever you call it), then call Page.Focus();

Web browser control: Detecting changes in form content

A form contains many elements, such as labels, Textbox, radio options box etc
How do you detect the user has changed a textbox input value, or has choosen a radio option within the content of a web browser control? (not the winform itself).
Do you handle a winform event for when the mouse clicked or keyboard keys pressed? or is there a better way to detect changes in the web browser content?
There are "quick and easy" ways, but IMHO, a better way is to load the state of the form into javascript variables (on load), and then compare only the elements you are interested in, when navigating away, or whatever.
For example, there may be some fields that aren't so relevant (say, a different value in a minor drop-down box) but some that are very important (i.e. the contents of this message box).
It's fairly trivial to do anyway; just check the values you have currently (on the given event you are capturing, i.e. browser close) and then compare them with the ones you saved.

Categories

Resources