public static void OnPhoneTextBoxTextChanged(PhoneTextBox textBox)
{
if (!string.IsNullOrEmpty(textBox.Text))
{
Brush foregroundBrush = (Brush)Application.Current.Resources["PhoneTextBoxForegroundBrush"];
if (textBox.Foreground != foregroundBrush)
textBox.Foreground = foregroundBrush;
}
}
This is definitely a bug
Comments: ** Comment from web user: AlexSorokoletov **
Or fix that in template
<TextBlock x:Name="MeasurementTextBlock"
Margin="8"
IsHitTestVisible="False"
Opacity="0"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
TextAlignment="{TemplateBinding TextAlignment}"
FontWeight="{TemplateBinding FontWeight}"
FontStyle="{TemplateBinding FontStyle}"
TextWrapping="{TemplateBinding TextWrapping}"
----->>> Foreground={StaticResource PhoneTextBoxForegroundBrush}
Text="{TemplateBinding Text}" />