Windows Phone tool kit bug
Windows phone tool kit 中PhoneTextBox控件有个bug,就是当从输入状态切换失去焦点时,再次进入输入状态时字体颜色会变浅,并且无法恢复。产生这个bug的原因是输入框的状态未及时改变回编辑状态。解决办法:
找到控件源码,在函数UpdateHintVisibility()中 ActualHintVisibility = Visibility.Collapsed;的后面添加Foreground = ForegroundBrushEdit;
即添加后的代码:
private void UpdateHintVisibility() { if (HintContent != null) { if (string.IsNullOrEmpty(Text)) { ActualHintVisibility = Visibility.Visible; Foreground = ForegroundBrushInactive; } else { ActualHintVisibility = Visibility.Collapsed; Foreground = ForegroundBrushEdit;// Dokay add } } }