Use Windows 10 virtual keyboard auto-completion api inside a WPF application - c#

When using the windows 10 virtual keyboard, it offert a auto-completion feature like smartphone keyboard. I want to use this feature in a WPF application without having to open the virtual keyboard.
Does an API exist to get those suggestion from a C#/Wpf app?
There is spell check feature in WPF but it is different from auto-completion.
Spell check can only suggest a word if it's completly typed but with a few mistake. It can't suggest word if you only type the begining of a word.
It don't work with several word with missing space or apostrophe. For example, in french "cest" will be corrected to "c'est" and "helloworld" will be corrected to "hello world"

Related

Entry field in Xamarin.Forms in Hiragana/Katakana/Kanji mode

i'm making a personal application using Xamarin Forms to register words in my own language (spanish) with the traducction in Hiragana, Katakana or Kanji.
Then i have fields (entrys) to write the text in each type but i want to write the text without needing to change my input keyboard when i'm introducing the text.
I have been searching but i only found a way using IMEMode in Windows Forms (not working in Xamaring Forms) and other replacing text directly from a character database.
Are there any library, NuGet Package, xalm attribute or something to change the character mode in entry object in Xamarin Forms to Hiragana/Katakana/Kanji?
Thanks.
Marcos.

How to implement a global WinAPI overlay interface

We need to implement a universal autocomplete for users at our company. Basically when someone starts with # and then types a name, we want to help them with autocomplete options (some sort of list showing).
This needs to work in any application in windows.
The plan is capture all keypresses, look for the # character, and if they have typed that start helping them with the autocomplete. If they select an option then we SendKeys the rest of the name down to the current cursor location, thereby finishing the name for them.
We have the keypress part working, but we aren't sure how to display the autocomplete feature. How can we implement a UI for this with the Win32 API?
Edit controls have the IAutoComplete and you can also use UWP TextBox and AutoSuggestBox.

Print a string in a Windows Universal App?

So I'm in a bit of a bind here as it seems Windows Universal Apps don't have access to the System.Drawing namespace. I'm building an interactive sign in sheet with an NDA box and a submit button.
The basic idea is that once the person signs in, they can press the submit button and a label printer nearby will print the name the user entered into a pair of text boxes.
I looked at the documentation provided by Microsoft here, but this seems to indicate going to some alternative page upon pressing a button. Is there a way to just print a string variable as with the PrintDocument class from the System.Drawing namespace?

Fully customizable message box in Windows Phone 7

I would like to create a message box in my Windows Phone 7 application, but I want to add the "never show again" button or checkbox inside of it. How can I do that? I searched about it and I found examples in XNA and found a code using Notificationbox, but it doesn't seem to work with C# or something.
My project is coded with C#, is there a way to implement a customizable message box?
Tomer Shamam has an example of how to do this at: http://blogs.microsoft.co.il/blogs/tomershamam/archive/2010/10/19/windows-phone-7-custom-message-box.aspx
He's put the code on http://wpassets.codeplex.com/

How to get text indent (tabs) from some text input?

For example, suppose I'm editing following text (\t is for tabs, it's not text)
'\t\t\tSome text...'
and my input keyboard position is right before 'S' (there is no selected text)
and I want to get number of tabs before 'S' (in this case it's 3)
So how to get that number of tabs using Win32 API?
p.s.
Maybe some function to get whole current line (and then parse that text)?
edit:
So I want my program (that is running in background and does not have a GUI) to determine number of tabs from current active line in any text editor that is currently active (that I'm editing in).
For some applications such as the standard Windows Notepad, it may be possible to do this from another application. Notepad itself is little more than big Win32 "Edit" control inside a resizeable window, so all the regular Win32 Edit control messages can be used to get the actual text and the caret position and so on.
However, in the general case of any Windows text editor, there is no requirement for applications to use a Win32 Edit control for their text editing needs (and in fact, to do so would be just reinventing Notepad). There is no standard Win32 API method to find out where the caret is pointing, because the application is free to draw text on the screen in any way it sees fit (and will store that text internally inside the application with no corresponding API for you to call).
Best Java coding practice is to make your code operating system platform independent as far as possible. If you are trying to implement a utility that is intrinsically Windows specific (e.g. heavily dependent on Win32 APIs), it would be better to use C++ or C# rather than Java.

Categories

Resources