Hi! I'm trying to animate with blinking incoming datarecord (from background thread).
I'm extending DataRecordCellArea style in my control:
<Style x:Key="aniDataRecordPresenter" TargetType="{x:Type igDP:DataRecordCellArea}" BasedOn="{StaticResource {x:Type igDP:DataRecordCellArea}}"> <Style.Triggers> <DataTrigger Binding="{Binding Path=Record.Tag, RelativeSource={RelativeSource Self}}" Value="true"> <DataTrigger.EnterActions> <BeginStoryboard Name="BackgroundColorStoryboard"> <Storyboard> <ColorAnimation DesiredFrameRate="5" Storyboard.TargetProperty="Background.Color" From="Black" To="Red" FillBehavior="Stop" RepeatBehavior="Forever" /> </Storyboard> </BeginStoryboard> <BeginStoryboard Name="BackgroundAlternateColorStoryboard"> <Storyboard> <ColorAnimation DesiredFrameRate="5" Storyboard.TargetProperty="BackgroundAlternate.Color" From="Black" To="Red" FillBehavior="Stop" RepeatBehavior="Forever" /> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> </DataTrigger> <DataTrigger Binding="{Binding Path=Record.Tag, RelativeSource={RelativeSource Self}}" Value="false"> <DataTrigger.EnterActions> <StopStoryboard BeginStoryboardName="BackgroundColorStoryboard" /> <StopStoryboard BeginStoryboardName="BackgroundAlternateColorStoryboard" /> </DataTrigger.EnterActions> </DataTrigger> </Style.Triggers> </Style> * This source code was highlighted with Source Code Highlighter .
Record.Tag receives true when record is added to the Item source of xamDataPresenter, and switches to false on RecordSeceltion event.
But when a wide range of records are blinking, application have performance issues.
May be there is another approach of record animation? Or any ways to improve animation performance ?
P.S.
I'm setting DataRecordCellAreaStyle in my FieldLayoutSettings
Hello,
I have been looking into your post and I have created a sample application using the style that you have posted. The XamDataGrid in the sample application contains 10 Fields and 2000 Records and it is working as expected and does not seem to have a performance issue. I have attached the sample application that I am referring to.
Please let me know if you can reproduce this behavior using my sample application or I have missed something from your scenario.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thanks!
Try to maximize window, performance issue comes again.