This is a migrated thread and some comments may be shown as answers.

Null Reference StartTransitionAnimation with Time Bar

1 Answer 27 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Grant asked on 02 Apr 2014, 05:30 AM
I have a RadChart and RadTimeBar defined in XAML as follows. When I select the TimeBar in my RadWindow control I get the following exception:

<telerik:RadTimeBar Name="timeBar1" Grid.Row="0"
                    PeriodStart="{Binding StartDate, Mode=TwoWay}"
                    PeriodEnd="{Binding EndDate, Mode=TwoWay}"
                    VisiblePeriodStart="{Binding VisiblePeriodStart, Mode=TwoWay}"
                    VisiblePeriodEnd="{Binding VisiblePeriodEnd, Mode=TwoWay}"
                    SelectionStart="{Binding SelectionStart, Mode=TwoWay}"
                    SelectionEnd="{Binding SelectionEnd, Mode=TwoWay}"                                   
                    MinSelectionRange="{Binding MinSelectionRange, Mode=TwoWay}"
                    MaxSelectionRange="{Binding MaxSelectionRange, Mode=TwoWay}"
        <telerik:YearInterval IntervalSpans="1" />
        <telerik:MonthInterval IntervalSpans="1,12" />
        <telerik:DayInterval IntervalSpans="1,5" />
        <!--<telerik:HourInterval IntervalSpans="1,30"/>-->
        <telerik:MinuteInterval IntervalSpans="1,30"/>
        <telerik:SecondInterval IntervalSpans="1,30"/>
    <telerik:RadScatterSparkline  x:Name="sparkLine" ItemsSource="{Binding FullRange}"  XValuePath="TimeStamp"  YValuePath="AvgVol"  Margin="0,3" />

<chart:RadChart x:Name="RadChartVol" ItemsSource="{Binding VolEvents}">
                <charting:ChartArea LegendName="legend" EnableAnimations="True"  EnableTransitionAnimations="True" >
                        <charting:AxisY Title="Total Volume [Count]"/>
                        <charting:AxisX Title="Date" AutoRange="True" IsDateTime="True" DefaultLabelFormat = "MM-dd hh:mm" LabelRotationAngle="90" LayoutMode="Normal" />
                <charting:ChartLegend Name="legend" Header="Detectors" />
    <chart:RadChart.TimeBar >
        <Binding ElementName="timeBar1" />

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.RadTransitionControl.PrepareAnimation()
   at Telerik.Windows.Controls.Charting.ChartArea.StartTransitionAnimation()
   at Telerik.Windows.Controls.RadChart.StartTransitionAnimationIfEnabled()
   at Telerik.Windows.Controls.RadChart.UpdateTimeBarFilters()
   at Telerik.Windows.Controls.RadChart.TimeBarChanged(DependencyObject target, DependencyPropertyChangedEventArgs args)
   at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)
   at System.Windows.Data.BindingExpression.SendDataToTarget()
   at System.Windows.Data.BindingExpression.SourceAcquired()
   at System.Windows.Data.BindingExpression.PerformTargetLoaded()
   at System.Windows.Data.Debugging.BindingBreakPoint.<>c__DisplayClass4.<BreakOnSharedType>b__3()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Delegate.DynamicInvoke(Object[] args)

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 04 Apr 2014, 05:14 PM
Hi Grant,

I tried to reproduce the described behavior, but on my side it works as expected. 

I am unsure of the exact reason for this issue. However, I have one suggestion - if you use a custom style - please check if without using it, you can reproduce the same behavior. If the issue is caused by the custom style, then you can send us a code snippet or a sample project, so that we can help you further. If the problem is not connected to any custom style, please provide us more information about your implementation.

I attached the test project I used to try to reproduce the issue. Please modify it in order to reproduce the described exception and send it back to us.

Thank you for your cooperation.


Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question