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
630
xamChart managing animation is procedule code
posted

Hi there

I am creating and binding series in procedule code, just to a data table. I like the animations used in the Feature browser, I am not sure how to manage this in the code behind. I try this below but it doesnt work but struggled to find source code example

 

c1.Animation.BeginTime =

 

TimeSpan.Parse("00:00:00.25");
c1.Animation.Duration =
new Duration(TimeSpan.Parse("0:0:03"));
c1.Animation.AccelerationRatio = 0.5;
c1.Animation.DecelerationRatio = 0.5;

Where c1 is a series object

Thanks in advance

  • 27093
    Verified Answer
    posted

    Hello Chris,

     

    I have been looking into your code snippet and think I have found the problem. When setting properties in the code behind you need to explicitly instantiate your values likes so:    c1.Animation = new Animation();   which is actually the equivalent of its xaml counterpart the empty Animation node <igCA:Animation …

     

    I tested your code snippet with this addition and it worked ok.

     

    Please let me know if you require any further assistance on the matter.

     

    Sincerely,

    Petar Monov

    Developer Support Engineer

    Infragistics Bulgaria

    www.infragistics.com/support

     

  • 9836
    Verified Answer
    posted

    You can try to set a new instance to the Animation property of the Series e.g:

    c1.Animation = new Infragistics.Windows.Chart.Animation()

                {

                    BeginTime = TimeSpan.FromSeconds(1),

                    Duration = TimeSpan.FromSeconds(3),

                    AccelerationRatio = 0.5,

                    DecelerationRatio = 0.5

                };