This question is locked. New answers and comments are not allowed.
Hi,
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:
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)
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}" SelectionChanged="timeBar1_SelectionChanged"> <telerik:RadTimeBar.Intervals> <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:RadTimeBar.Intervals> <telerik:RadScatterSparkline x:Name="sparkLine" ItemsSource="{Binding FullRange}" XValuePath="TimeStamp" YValuePath="AvgVol" Margin="0,3" /></telerik:RadTimeBar><chart:RadChart x:Name="RadChartVol" ItemsSource="{Binding VolEvents}"> <chart:RadChart.DefaultView> <charting:ChartDefaultView> <charting:ChartDefaultView.ChartArea> <charting:ChartArea LegendName="legend" EnableAnimations="True" EnableTransitionAnimations="True" > <charting:ChartArea.AxisY> <charting:AxisY Title="Total Volume [Count]"/> </charting:ChartArea.AxisY> <charting:ChartArea.AxisX> <charting:AxisX Title="Date" AutoRange="True" IsDateTime="True" DefaultLabelFormat = "MM-dd hh:mm" LabelRotationAngle="90" LayoutMode="Normal" /> </charting:ChartArea.AxisX> </charting:ChartArea> </charting:ChartDefaultView.ChartArea> <charting:ChartDefaultView.ChartLegend> <charting:ChartLegend Name="legend" Header="Detectors" /> </charting:ChartDefaultView.ChartLegend> </charting:ChartDefaultView> </chart:RadChart.DefaultView> <chart:RadChart.TimeBar > <Binding ElementName="timeBar1" /> </chart:RadChart.TimeBar></chart:RadChart>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)
