Again am stuck to change the background color of my text box but the weird part is forground is works fine but not the background.
Here is my xaml
<TextBox
Name="tbHeadline"
Text="{Binding SelectedStory.Headline, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"
Grid.Column="1"
Grid.Row="6"
TextWrapping="NoWrap"
d:LayoutOverrides="Height"
Grid.ColumnSpan="2"
HorizontalAlignment="Stretch"
LostFocus="tbHeadline_LostFocus"
/>
in my Xaml.cs
I have the following code
tbHeadline.Background = Brushes.Gray; //this not working
tbHeadline.Foreground = Brushes.Gray; //this is working
here is the sample output
Thanks for your help.
Update from the expert comments
Okie, i added a textbox in the grid and this what it look like
<TextBox Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="10" Grid.RowSpan="2" Height="23" HorizontalAlignment="Left" Margin="50,14,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" Background="#E6000000" />
Even i set the background color to Black but its not visible when i run the application.