or
System.ArgumentNullException was unhandled HResult=-2147467261 Message=Value cannot be null.Parameter name: element Source=Telerik.Windows.Controls ParamName=element StackTrace: at Telerik.Windows.Controls.ChildrenOfTypeExtensions.<GetChildrenRecursive>d__3.MoveNext() at System.Linq.Enumerable.<OfTypeIterator>d__aa`1.MoveNext() at Telerik.Windows.Controls.Docking.ToolWindow.ActivatePane() at Telerik.Windows.Controls.Docking.ToolWindow.OnDragStart(Point globalMousePosition, Boolean isResize) at Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IDragAware.OnDragStart(Point globalMousePosition, Boolean isResize) at Telerik.Windows.Controls.InternalWindow.WindowHostBase.OnDragStart(Point globalMousePosition, Boolean isResize) at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.TryBeginDragResize(IntPtr hwnd, Boolean resizing) at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.HandleMoving(IntPtr hwnd, IntPtr wParam, IntPtr lParam, Boolean& handled) at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) InnerException:<telerik:ChartDataSource x:Name="EightHourChartDataSource" ItemsSource="{Binding EightHourData}" SamplingUnit="Hour" SamplingUnitInterval="1" /> <StackPanel Margin="0,0,0,30" Orientation="Vertical"> <Label Content="Concentration % Last 8 Hours" FontFamily="/GUIO;component/Fonts/#Segoe WP Black" FontSize="16" /> <telerik:RadCartesianChart x:Name="chart1" Height="150"> <telerik:RadCartesianChart.HorizontalAxis> <telerik:DateTimeContinuousAxis LabelInterval="2" LabelFormat="HH:mm" FontFamily="Segoe UI" PlotMode="OnTicks" TickOrigin="{Binding Timestamp}" /> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis /> </telerik:RadCartesianChart.VerticalAxis> <telerik:RadCartesianChart.Behaviors> <telerik:ChartPanAndZoomBehavior /> </telerik:RadCartesianChart.Behaviors> <telerik:LineSeries CategoryBinding="Timestamp" ValueBinding="Data" ItemsSource="{Binding ElementName=EightHourChartDataSource}" StrokeThickness="2" Stroke="Black" ShowLabels="True"> <telerik:LineSeries.PointTemplate> <DataTemplate> <Ellipse Width="6" Height="6" Fill="Black" /> </DataTemplate> </telerik:LineSeries.PointTemplate> <telerik:LineSeries.LabelConnectorsSettings> <telerik:ChartSeriesLabelConnectorsSettings> <telerik:ChartSeriesLabelConnectorsSettings.Style> <Style TargetType="{x:Type Path}"> <Setter Property="Stroke" Value="Black" /> </Style> </telerik:ChartSeriesLabelConnectorsSettings.Style> </telerik:ChartSeriesLabelConnectorsSettings> </telerik:LineSeries.LabelConnectorsSettings> <telerik:LineSeries.LabelDefinitions> <telerik:ChartSeriesLabelDefinition VerticalAlignment="Top" Margin="0 0 0 6"> <telerik:ChartSeriesLabelDefinition.Template> <DataTemplate> <Border Background="Black" BorderBrush="White" BorderThickness="1"> <TextBlock Text="{Binding Label}" Foreground="White" FontFamily="Segoe UI" Margin="2 0 2 1" FontSize="10" /> </Border> </DataTemplate> </telerik:ChartSeriesLabelDefinition.Template> </telerik:ChartSeriesLabelDefinition> </telerik:LineSeries.LabelDefinitions> </telerik:LineSeries> </telerik:RadCartesianChart>Protected Overrides Sub OnViewReady(view As Object) MyBase.OnViewReady(view) 'Get the data Dim frm = Now.Subtract(TimeSpan.FromHours(8)) EightHourData = New BindableCollection(Of DecimalData)(_dataService.GetDecimalData("CoolantMonitor").Where(Function(d) d.Timestamp > frm)) If Not EightHourData.Any Then Return 'Get the date of the first point with 30 min padding Dim f = EightHourData.First.Timestamp.Subtract(TimeSpan.FromMinutes(30)) FromDate = New Date(f.Year, f.Month, f.Day, f.Hour, 0, 0) 'Get the date of the last point with 30 min padding Dim t = EightHourData.Last.Timestamp.Add(TimeSpan.FromMinutes(30)) ToDate = New Date(t.Year, t.Month, t.Day, t.Hour, 0, 0) 'Get the view Dim v As CoolantMonitorDataView = Me.GetView 'Get the chart Dim cv As RadCartesianChart = v.chart1 'Create a vertical axis to scale the vertical view to the min and max cv.VerticalAxis = New LinearAxis With {.Minimum = 0, .Maximum = 20, .ShowLabels = False} 'Create a line series that will scale the horizontal view Dim ls As New LineSeries ls.DataPoints.Clear() _startPoint = New CategoricalDataPoint With {.Category = FromDate, .Value = 0} ls.DataPoints.Add(_startPoint) _endPoint = New CategoricalDataPoint With {.Category = ToDate, .Value = 0} ls.DataPoints.Add(_endPoint) cv.Series.Add(ls) cv.Annotations.Clear() 'Get the range settings Dim ranges = CoolantConcentrationRange.GetRange.Ranges 'Create a marked zone for each range and add it the the Chart Annotations For Each r In ranges Dim b As New SolidColorBrush(r.RangeColor) b.Opacity = 0.3 cv.Annotations.Add(New CartesianMarkedZoneAnnotation With {.HorizontalFrom = FromDate, .HorizontalTo = ToDate, .VerticalFrom = r.LowerValue, .VerticalTo = r.UpperValue, .Fill = b}) Next End Sub<telerik:RadGridView RowIndicatorVisibility="Collapsed" AllowDrop="False" AutoGenerateColumns="False" CanUserDeleteRows="False" CanUserReorderColumns="False" GridLinesVisibility="Both" ShowGroupPanel="False" ShowColumnHeaders="True" IsFilteringAllowed="False" CanUserFreezeColumns="False" CanUserInsertRows="False" >...</telerik:RadGridView>namespace MyUI{ public class MyGridView : Telerik.Windows.Controls.RadGridView { public MyGridView() : base() { this.RowIndicatorVisibility = System.Windows.Visibility.Collapsed; this.AllowDrop = false; this.AutoGenerateColumns = false; this.CanUserDeleteRows = false; this.CanUserReorderColumns = false; this.GridLinesVisibility = Telerik.Windows.Controls.GridView.GridLinesVisibility.Both; this.ShowGroupPanel = false; this.ShowColumnHeaders = true; this.IsFilteringAllowed = false; this.CanUserFreezeColumns = false; this.CanUserInsertRows = false; } }}<Window ... xmlns:local="clr-namespace:MyUI;assembly=MyUI"><local:MyGridView >...</local:MyGridView></Window>