每個人我都面臨一個問題。我正處於初始階段。如果愚蠢的問題請忽略。 我使用「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