SetInputScope
public static class Extensions { public static void SetInputScope(this TextBox tb, InputScopeNameValue inputScopeNameValue) { tb.InputScope = new System.Windows.Input.InputScope() { Names = { new InputScopeName() { NameValue = inputScopeNameValue } } }; } }Example:
textBoxAmount.SetInputScope(InputScopeNameValue.Number);
Description
Set the InputScope of TextBox on a Windows 7 Phone.
Details
- Author: Fons Sonnemans
- Submitted on: 5/21/2010 5:57:04 PM
- Language: C#
- Type: System.Windows.Controls.TextBox
- Views: 2539
Double click on the code to select all.