TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Issac Abraham
NA
19
0
Datagrid Column Text Background Colour in WPF
Feb 22 2012 1:24 AM
Hi,
im having a grid and in that there are 3columns
for one column im highlighting the text background color and im success for that
with the following code
<DataGridTextColumn Header="" Binding="{Binding ServiceType.Name}" Width="75">
<DataGridTextColumn.ElementStyle>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="TextBlock.Background" Value="Gray" />
<Setter Property="TextBlock.FontSize" Value="12" />
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
now when in click any row in
DataGrid
i would like to change the color from
'Gray' to 'White'
i.e
<Setter Property="TextBlock.Background" Value="Gray" /> to
<Setter Property="TextBlock.Background" Value="
White
" />
can anyone help which trigger to be used here
Reply
Answers (
2
)
Displaying statistical data
Treeview Expand/Collapse icons on right side in WPF