Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
335
DataRecord Animation
posted

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



 

Parents
No Data
Reply
  • 30945
    Offline posted

    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

    RecordAnimationPerformance.zip
Children