Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Windows Phone 应用程序的主页上放置了一个 TextBox。一旦我点击它,操作系统就会显示一个虚拟键盘。一旦键盘出现,有没有办法显示十进制数字?此操作相当于点击键盘左下角的 &123。TextBox 应该只接受数字。
在您的 XAML 代码中,更改输入范围。例如:
<TextBox x:Name="expense" Margin="0,61,252,16" Text="Expense"> <TextBox.InputScope> <InputScope> <InputScopeName NameValue="Digits" /> </InputScope> </TextBox.InputScope> </TextBox>