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
Kailash Chandra Behera
NA
12.8k
9.5m
DataTrigger Works Very slow in WPF
Jul 8 2014 9:16 AM
Hi All,
I am Trying to change Datagrid cell background color at runtime by using datatrigger, datatrigger works fine but that is very slow.
Code:
<DataGridTextColumn.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="{Binding Background, ElementName=txtFont, UpdateSourceTrigger=PropertyChanged}"/>
<Setter Property="Background" Value="{Binding Background, ElementName=txtBackground, UpdateSourceTrigger=PropertyChanged}" />
</Trigger>
<DataTrigger Binding="{Binding ColorBIDQty, UpdateSourceTrigger=PropertyChanged}" Value="1">
<Setter Property="Background" Value="{Binding Background, ElementName=txtDownTick, UpdateSourceTrigger=PropertyChanged}" />
</DataTrigger>
<DataTrigger Binding="{Binding ColorBIDQty, UpdateSourceTrigger=PropertyChanged}" Value="2">
<Setter Property="Background" Value="{Binding Background, ElementName=txtBackground, UpdateSourceTrigger=PropertyChanged}" />
</DataTrigger>
<DataTrigger Binding="{Binding ColorBIDQty, UpdateSourceTrigger=PropertyChanged}" Value="3">
<Setter Property="Background" Value="{Binding Background, ElementName=txtUpTick, UpdateSourceTrigger=PropertyChanged}" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTextColumn.CellStyle>
In the above code i am trying to change the cell background color on the basis of ColorBidQty. The color is not changing in the speed as i expect.
I have erased some text from image because of confidential matter.
Please try to help me
Thanks,
Kailash
Reply
Answers (
0
)
MVVM WPF Architecture
Assembly error in wpf application in vs2010