Hi,
I have an application using the telerik docking-framework and timelines. I have an issue when undocking a frame containing a RadTimeline.
I get a NullPointerException in Telerik.Windows.Controls.TimeBar.TimeIntervalContainerBase.RemoveDummyItem.
It turns out I only get the exception when I have the Intervals property set. If I remove the Intervals it does not crash.
I have another dockpanel with a RadTimeline as well, but that one does not generate the NullPointerException, so maybe I am doing something bad.
My RadTimeline xaml which crashes looks like this:
<
telerik:RadTimeline
MinHeight
=
"55"
Margin
=
"2"
AutoSort
=
"False"
DurationPath
=
"Duration"
GroupExpandMode
=
"None"
ItemsSource
=
"{Binding TimePeriods}"
PeriodEnd
=
"{Binding VisiblePeriodEnd, Mode=OneWay}"
PeriodHeaderStyle
=
"{StaticResource PeriodHeaderStyle}"
PeriodStart
=
"{Binding VisiblePeriodStart, Mode=OneWay}"
ScrollMode
=
"None"
SnapsToDevicePixels
=
"True"
StartPath
=
"Start"
TimelineItemTemplate
=
"{StaticResource ItemTemplate}"
VerticalScrollBarVisibility
=
"Hidden"
VisiblePeriodEnd
=
"{Binding VisiblePeriodEnd, Mode=OneWay}"
VisiblePeriodStart
=
"{Binding VisiblePeriodStart, Mode=OneWay}"
>
<
telerik:RadTimeline.Intervals
>
<
telerik:DayInterval
FormatterProvider
=
"{StaticResource DayFormatterProvider}"
/>
</
telerik:RadTimeline.Intervals
>
</
telerik:RadTimeline
>
Here is the callstack:
An unhandled exception of type 'System.NullReferenceException' occurred in Telerik.Windows.Controls.DataVisualization.dll
Objektreferensen har inte angetts till en instans av ett objekt.
Ohanterat undantag: System.NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt.
vid Telerik.Windows.Controls.TimeBar.TimeIntervalContainerBase.RemoveDummyItem()
vid Telerik.Windows.Controls.TimeBar.TimeIntervalContainerBase.MeasureIntervalFormats()
vid System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
vid System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
vid System.Windows.Threading.DispatcherOperation.InvokeImpl()
vid MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
vid System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
vid MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
vid System.Windows.Threading.DispatcherOperation.Invoke()
vid System.Windows.Threading.Dispatcher.ProcessQueue()
vid System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
vid MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
vid MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
vid System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
vid System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
vid System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
vid MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
vid MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
vid System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
vid System.Windows.Application.RunDispatcher(Object ignore)
vid System.Windows.Application.RunInternal(Window window)
Do you have any clue what is causing the issue?
Best regards
/Ola Nygren