How can I implement spell check in a WP7 text boxes - windows-phone-7

How can I implement spell check in a WP7 text boxes without using input scope of a text box

You may use the TextChanged event and process the text entered on the TextBox for spelling checks. That would be my approach. But it will slow down your typing and UI mapping. Best method is to use the inputScope and let the device do its work which you do not want. I hope my answer helps you.

Related

How to test the auto fill listbox in WPFObject("SearchBox")?

I have a WPFObject("SearchBox") in my WPF application.Its an autofill searchbox.On typing a text in it,it displays a listbox with text related to the search.
What is the best way to test it ?I am using TC9 and jscript.
Thanks!
You need to use the Keys method. For example:
parentObj.WPFObject("SearchBox").Keys("test");
By default, TestComplete records text typing with the SetText method as it works faster than Keys, but in some cases you need to simulate working with a keyboard and the Keys method is the best way to go. You can find information on this in the Simulating Keystrokes help topic. Also, please see the Entering Text into an Edit Control topic for information on the difference between these two methods and the Recording Options Dialog topic to get information on how to make TestComplete use the Keys method when recording a new test.

How do SIP auto-corrections get communicated to a TextBox?

I am trying to debug a tricky situation with auto-correction not getting correctly handled in a TextBox, but I am stuck:
I cannot find how the tapping of an auto-correction suggestion in the SIP gets communicated to the TextBox.
I have traced the KeyUp, KeyDown, TextInput, TextInputStart and TextInputUpdate events, but they do not seem to be involved in the update of the Text in the TextBox object.
Background:
When a language other than Greek is used, auto-correction works as it should for a TextBox in my app. However, when the language is set to Greek, nothing happens when tapping on the suggested word ... On the other hand, in TextBoxes in standard phone apps (e.g. adding text in the Notes section of a contact) Greek auto-correction works perfectly. So, my first guess is that there is something wrong with the TextBox rather than with the SIP. My plan is to subclass TextBox, modifying only its auto-correction handling parts.
Any help would be much appreciated,
Gerasimos
Update:
I made a few tests and this seems to be a problem in all non standard apps. Specifically, I tested the eBay and SkyMap applications and in both cases English auto-corrections work, while Greek do not.
The problem is easy to reproduce:
put a textbox in an application (with an inputScope that has auto-corrections enabled)
use a Greek keyboard layout
tap 1-2 random letters.
tap on one of the proposed auto-corrections. Only the final space is introduced, and in cases that the cursor is between two spaces (as I preferred to test it) nothing happens.
So, I believe that there is a bug somewhere in the framework part and not in the application code. Now, if we could find how this auto-correction tapping is communicated to the TextBox... :-)
You should not be able to interrupt the SIP directly, You can edit the content of the textbox after the value has been entered/changed. Alternatively, you can implement something like an autosuggest if your intentions are to change the content instead of the visuals.

Does Windows allow to have a window with both the help button and the min/max buttons?

I want to put help buttons on all my windows, like this:
But when I put the help button in, the minimize/maximize buttons disappear. Does Windows forbid having the min/max buttons together with the help buttons? That would be disappointing because that would mean I could put the help button only on dialogs and not on frames.
If Windows does forbid this, it would be nice to see an official Microsoft document which talks about this policy.
It is not possible through setting windows styles. If you really wanted to you could set some hooks that would probably let you do what you want, but I would not recommend doing that. You can mimic the functionality of the help button by sending the WM_HELP message.
According to MSDN, the styles WS_MAXIMIZEBOX and WS_MINIMIZEBOX can not be combined with WS_EX_CONTEXTHELP.
Although it is true what daalbert says, with some effort it is indeed possible to draw just about anything properly on the window frame. Of course this is in no way "official" and the limitation that daalbert mentions still stands.
You can listen for WM_NCPAINT and draw the button yourself with the help of DrawFrameControl with DFC_BUTTON (which makes sure it will look like the real thing). Use WM_NCHITTEST and friends (WM_NC*BUTTON*) to find out whether the button you draw gets clicked.
So yes, it's technically possible to achieve what you want but usually not worth the extra effort.
Just wanted to have this on record for completeness.

Change input scope for Password text boxes on Windows Phone 7

How can you do the equivalent of changing the input scope on the password text boxes in WP7? They don't have an input scope field so I'm not sure how to do it.
I'd like to have a password box where you can only use digits as your password, like the phone lock screen.
Thanks
There is no way to set the inputscope of the PasswordBox. If you really must do this you'll have to create your own control.
If making your own version of the phone lock screen I'd recommend looking at using a TextBlock and a number (12) of Buttons rather than a PasswordBox or TextBox.
Yes as Matt says, the easy thing to do would be to have the
textChanged events
keyUp event
keyDown event
to manipulate the textbox.text property according to your requirement. This will be much easier than implementing a new control.

How do you create a textbox in visual Studio with c#?

I feel kind of silly asking this question as it seems really simple, but how do I create a text box that I can type in instructions and stuff like that. I don't need the user to be able to change it, it is just to give instructions. I tried the label, but it only allows one line. I need something that can allow about a paragraph or so. Similar to the box in an installer that describes what the program does. What did I miss?
You can use a label but set its AutoSize property to false. This allows you to size the label as you wish and it will automatically wrap the text to fit.
You can also anchor the label to the parent form to have it automatically resize and reflow the text if the user resizes the parent form.
You want a text box, but set its Read Only property to TRUE, and maybe Enabled to FALSE

Resources