在文本框中输值与清除值
private void myTextBox_TextChanged(object sender, TextChangedEventArgs e)
{
myTextBlock.Text = "you typed: " + myTextBox.Text;
}
private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{ myTextBox.Focus();
}
private void myButton_Click_1(object sender, RoutedEventArgs e)
{ myTextBox.Text = "";
myTextBlock.Text = "";
myTextBox.Focus();//再次调用focus,使输入键盘在clear之后仍出现
}
编辑器加载中...

浙公网安备 33010602011771号