The Windows Phone 7 Chinese input module can be integrated into your Windows Phone 7 Application. CurrentlySupports Simplified Chinese pinyin, five strokes, Zheng code, and traditional Chinese cangjieInput. In the simplest case, you only need to add a line to the XAML file.Code. CurrentlyPublic TestOfficially released. You are welcome to try Windows Phone 7 developers who need Chinese characters. Please also send your feedback to me for improvement.
We hope to facilitate your Windows Phone 7 Application before Windows Phone 7 releases the Chinese version. : Http://files.cnblogs.com/tinytian/InputToolkit.zip,ProgramSet version number1.0.1.0, Please note.
Available API description:
-
- Tinytian. windowsphone. Controls. dictionarycontroller indicates the type of the dictionary controller.
- Public static inputmode {Get;} gets the input mode.
- Public static void preload (inputmode) pre-loads the dictionary of the specified input mode.
- Public static void reload (inputmode) reloads the dictionary of the specified input mode.
- Public static void savedictionary () saves the user dictionary.
- Tinytian. windowsphone. Controls. imecontrol indicates the type of the input control.
- Public inputmode {Get; set;} gets or sets the input mode.
- Public textbox {Get; set;} gets or sets the text box to be input.
- Public new bool isenabled {Get; set;} gets or sets whether the input tool is allowed.
- Public static readonly dependencyproperty inputmodeproperty: dependency attribute of the input mode.
- Public static readonly dependencyproperty textboxproperty: The dependency attribute of the text box to be input.
- Public static readonly new dependencyproperty textboxproperty no dependency attribute of the input tool can be used.
-
- Tinytian. windowsphone. Controls. inputmode specifies the input method.
- Pinyin = 0 indicates Pinyin input.
- Wubi = 1 indicates five input records.
- Zhengma = 2 indicates the Zheng code input.
- Cangjie = 3 indicates the warehouse receiving input.
Sample Code (XAML ):
1 < Phone: phoneapplicationpage
2 X: Class ="Tinytian. chineseutilities. Main"
3 Xmlns = "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4 Xmlns: x = "Http://schemas.microsoft.com/winfx/2006/xaml"
5 Xmlns: Phone = "CLR-namespace: Microsoft. Phone. controls; Assembly = Microsoft. Phone"
6 Xmlns: Shell = "CLR-namespace: Microsoft. Phone. Shell; Assembly = Microsoft. Phone"
7 Xmlns: d = "Http://schemas.microsoft.com/expression/blend/2008"
8 Xmlns: MC = "Http://schemas.openxmlformats.org/markup-compatibility/2006"
9 Xmlns: Input = "CLR-namespace: tinytian. windowsphone. controls; Assembly = inputtoolkit"
10 MC: ignorable = "D" D: designwidth = "480" D: designheight = "696"
11 Fontfamily =" {Staticresource phonefontfamilynormal} "
12 Fontsize =" {Staticresource phonefontsizenormal} "
13 Foreground =" {Staticresource phoneforegroundbrush} "
14 Shell: systemtray. isvisible = "True" >
15 < Grid X: Name = "Layoutroot" Background = "Transparent" >
16 < Grid. rowdefinitions >
17 < Rowdefinition Height = "Auto" />
18 < Rowdefinition Height = "*" />
19 </ Grid. rowdefinitions >
20 < Stackpanel X: Name = "Titlepanel" Grid. Row = "0" Margin = "12, 17" >
21 < Textblock X: Name = "Applicationtitle" Text = "Input toolkit" Style =" {Staticresource phonetextnormalstyle} " />
22 </ Stackpanel >
23 < Grid X: Name = "Contentpanel" Grid. Row = "1" Margin = "0, 0, 0, 28" >
24 < Textbox Name = "Txteditor" Textwrapping = "Wrap" Acceptsreturn = "True" Verticalalignment = "TOP" Margin = "12, 0" Maxheight = "205" Verticalscrollbarvisibility = "Auto" />
25 < Input: imecontrol Name = "Ime" Textbox =" {Binding elementname = txteditor} " Margin = "0,302" Verticalalignment = "Bottom" />
26 </ Grid >
27 </ Grid >
28 < Phone: phoneapplicationpage. ApplicationBar >
29 < Shell: ApplicationBar Isvisible = "True" Ismenuenabled = "True" >
30 < Shell: applicationbariconbutton X: Name = "Btnsave" Iconuri = "/Icons/appbar.save.rest.png" Text = "Save ..." />
31 </ Shell: ApplicationBar >
32 </ Phone: phoneapplicationpage. ApplicationBar >
33 </ Phone: phoneapplicationpage >
Authorization description:
To use the application of this input module, you need to add"Chinese input provided by tinytian (http://tinytian.cnblogs.com)", Where the blog address is optional.
Note:
After your application is integrated, please send me your contact information and application information. My Windows Live Messenger or email address is tinytian (AT) live.com, so that you will be notified if I provide an updated version.