每个人我都面临一个问题。我正处于初始阶段。如果愚蠢的问题请忽略。 我使用“InputPrompt”控件(从有趣的工具包编码)获取电话号码形式的值。当我尝试以123-345-6789的形式输入数字时,光标位置发生变化并返回到先前的值。代码:PhoneNumber屏蔽输入提示
//事件
input.TextInputStart += new TextCompositionEventHandler(input_TextInputStart);
//事件处理
void input_TextInputStart(object sender, TextCompositionEventArgs e)
{
if(input.value.lenght == 2)
{
input.value += '-';
}
if(input.value.lenght == 5)
{
input.value += '-';
}
if(input.value.lenght == 9)
{
input.value += '-';
}
}
并且在输入端没有selectionstart方法提示 – HmXa
这是无法使用手机输入提示中的数字掩码。我们只需要创建一个自定义控件。这里是一个helle [链接](http://developer.nokia.com/Community/Wiki/How_to_use_Pop-Ups_in_Windows_Phone) – HmXa