I have problem with changing color of disabled textbox. I have already 'foreground' property for my textbox when it is enabled. But I want to set another color when it is disabled. How can I achieve this?
@Harry
It's nothing special
XML
<TextBox x:Name="txt1" HorizontalAlignment="Left" Margin="98,185,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="160" IsEnabled="False" Background="Blue" />
<Button x:Name="btn1" Content="Button" HorizontalAlignment="Left" Margin="98,271,0,0" VerticalAlignment="Top" Click="btn1_Click"/>
CS:
private void btn1_Click(object sender, RoutedEventArgs e)
{
txt1.IsEnabled = true;
}
By default txt1 is disabled and has grey color. I want change this color.
I can operate only on colors of enabled texbox. Now is set to 'blue'