Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

Do not throw when Series is null as it causes unnecessary app crash #517

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BuildTools/BuildNuGet.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SET MSBUILD=%WINDIR%\microsoft.net\framework\v4.0.30319\MSBuild.exe
%MSBUILD% BuildNuget.UWP.proj /property:Version=1.0.2.11
%MSBUILD% BuildNuget.UWP.proj /property:Version=1.0.2.14-patched
2 changes: 1 addition & 1 deletion BuildTools/BuildNuget.UWP.proj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Target Name="PrepareNugetProperties">

<PropertyGroup>
<Version Condition= " '$(Version)' == '' ">1.0.2.11</Version>
<Version Condition= " '$(Version)' == '' ">1.0.2.14-patched</Version>
<FullPathDeployDirectory>$([System.IO.Path]::GetFullPath('$(DeployDirectory)'))</FullPathDeployDirectory>
<BinariesSubDir>$(BinariesTargetDirectory)</BinariesSubDir>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<icon>images\uwp.png</icon>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>UI for Universal Windows Platform is a toolset for building Universal Windows Platform apps for the Windows Store and the enterprise. The library is designed to offer the same user experience, functionality and behavior on Windows devices of all form factors.</description>
<releaseNotes>For full release notes see https://github.com/telerik/UI-For-UWP/releases/tag/1.0.2.11</releaseNotes>
<releaseNotes>For full release notes see https://github.com/telerik/UI-For-UWP/releases/tag/1.0.2.14-patched</releaseNotes>
<tags>UWP Windows Telerik Controls XAML C#</tags>
<language>en-US</language>
</metadata>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,4 @@
<PlatformPath>$(Platform)</PlatformPath>
<PlatformPath Condition="$(Platform) == 'AnyCPU' or $(Platform) == ''">x86</PlatformPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="Telerik.UI.Xaml.Map.UWP">
<HintPath>$(MSBuildThisFileDirectory)..\..\lib\uap10.0\$(PlatformPath)\Telerik.UI.Xaml.Map.UWP.dll</HintPath>
</Reference>
<Reference Include="Telerik.UI.Drawing">
<HintPath>$(MSBuildThisFileDirectory)..\..\lib\uap10.0\$(PlatformPath)\Telerik.UI.Drawing.winmd</HintPath>
</Reference>
</ItemGroup>
</Project>
12 changes: 7 additions & 5 deletions Controls/Chart/Chart.UWP/Chart.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -523,19 +523,21 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights">
<Version>1.0.0</Version>
<Version>2.14.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.ApplicationInsights.PersistenceChannel">
<Version>1.0.0</Version>
<Version>1.2.3</Version>
</PackageReference>
<PackageReference Include="Microsoft.ApplicationInsights.WindowsApps">
<Version>1.0.0</Version>
<Version>1.1.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.0.0</Version>
<Version>6.2.14</Version>
</PackageReference>
<PackageReference Include="StyleCop.MSBuild">
<Version>4.7.55</Version>
<Version>6.2.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Linq;
using Telerik.Charting;
using Telerik.Core;
using Telerik.UI.Xaml.Controls.Chart;
using Telerik.UI.Xaml.Controls.Chart.Primitives;
using Windows.Devices.Input;
using Windows.Foundation;
Expand Down Expand Up @@ -242,7 +241,7 @@ public static DataTemplate GetIntersectionTemplate(DependencyObject instance)
{
if (instance == null)
{
throw new ArgumentNullException();
return null;
}

return instance.GetValue(IntersectionTemplateProperty) as DataTemplate;
Expand Down Expand Up @@ -276,7 +275,7 @@ public static DataTemplate GetTrackInfoTemplate(DependencyObject instance)
{
if (instance == null)
{
throw new ArgumentNullException(nameof(instance));
return null;
}

return instance.GetValue(TrackInfoTemplateProperty) as DataTemplate;
Expand All @@ -303,7 +302,7 @@ public static void SetTrackInfoTemplate(DependencyObject instance, DataTemplate
/// </summary>
internal void HandleDrag(Point currentPosition)
{
if (currentPosition.X > this.chart.PlotAreaDecorationSlot.X
if (currentPosition.X > this.chart.PlotAreaDecorationSlot.X
&& currentPosition.X < (this.chart.PlotAreaDecorationSlot.X + this.chart.PlotAreaDecorationSlot.Width))
{
this.position = currentPosition;
Expand Down Expand Up @@ -561,16 +560,16 @@ private void UpdateVisuals()
else
{
// select points only with the same category. TODO: Refactor this.
points = context.DataPoints.Where(c =>
points = context.DataPoints.Where(c =>
c.DataPoint is CategoricalDataPoint &&
point.Category.Equals(((CategoricalDataPoint)c.DataPoint).Category)).ToList();
}

context = new ChartDataContext(points, context.ClosestDataPoint);
}
}
if (context.ClosestDataPoint != null

if (context.ClosestDataPoint != null
&& context.ClosestDataPoint.DataPoint.LayoutSlot.X > this.chart.PlotAreaClip.X
&& context.ClosestDataPoint.DataPoint.LayoutSlot.X < (this.chart.PlotAreaClip.X + this.chart.PlotAreaClip.Width))
{
Expand Down Expand Up @@ -768,6 +767,12 @@ private void BuildIndividualTrackInfos(ChartDataContext context)

foreach (DataPointInfo info in infos)
{
DataTemplate template = GetTrackInfoTemplate(info.Series);
if (template == null)
{
continue;
}

ContentPresenter presenter;
if (this.individualTrackInfos.Count > index)
{
Expand All @@ -782,7 +787,7 @@ private void BuildIndividualTrackInfos(ChartDataContext context)
}

presenter.Content = info;
presenter.ContentTemplate = GetTrackInfoTemplate(info.Series);
presenter.ContentTemplate = template;

index++;
}
Expand Down Expand Up @@ -861,4 +866,4 @@ public int Compare(DataPointInfo x, DataPointInfo y)
}
}
}
}
}
6 changes: 4 additions & 2 deletions Controls/Core.UWP/Core.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,12 @@
<Version>5.0.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.Portable.Compatibility">
<Version>1.0.0</Version>
<Version>1.0.1</Version>
</PackageReference>
<PackageReference Include="StyleCop.MSBuild">
<Version>4.7.55</Version>
<Version>6.2.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
Expand Down
6 changes: 4 additions & 2 deletions Controls/Data.UWP/Data.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,12 @@
<Version>5.0.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.Portable.Compatibility">
<Version>1.0.0</Version>
<Version>1.0.1</Version>
</PackageReference>
<PackageReference Include="StyleCop.MSBuild">
<Version>4.7.55</Version>
<Version>6.2.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.0.0</Version>
<Version>6.2.14</Version>
</PackageReference>
<PackageReference Include="StyleCop.MSBuild">
<Version>4.7.55</Version>
<Version>6.2.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,21 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights">
<Version>1.0.0</Version>
<Version>2.14.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.ApplicationInsights.PersistenceChannel">
<Version>1.0.0</Version>
<Version>1.2.3</Version>
</PackageReference>
<PackageReference Include="Microsoft.ApplicationInsights.WindowsApps">
<Version>1.0.0</Version>
<Version>1.1.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.0.0</Version>
<Version>6.2.14</Version>
</PackageReference>
<PackageReference Include="StyleCop.MSBuild">
<Version>4.7.55</Version>
<Version>6.2.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
12 changes: 7 additions & 5 deletions Controls/Grid/Grid.UWP/Grid.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -472,19 +472,21 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights">
<Version>1.0.0</Version>
<Version>2.14.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.ApplicationInsights.PersistenceChannel">
<Version>1.0.0</Version>
<Version>1.2.3</Version>
</PackageReference>
<PackageReference Include="Microsoft.ApplicationInsights.WindowsApps">
<Version>1.0.0</Version>
<Version>1.1.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.0.0</Version>
<Version>6.2.14</Version>
</PackageReference>
<PackageReference Include="StyleCop.MSBuild">
<Version>4.7.55</Version>
<Version>6.2.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
6 changes: 4 additions & 2 deletions Controls/Input/Input.UWP/Input.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.0.0</Version>
<Version>6.2.14</Version>
</PackageReference>
<PackageReference Include="StyleCop.MSBuild">
<Version>4.7.55</Version>
<Version>6.2.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
10 changes: 6 additions & 4 deletions Controls/Primitives/Primitives.UWP/Primitives.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -425,16 +425,18 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.0.0</Version>
<Version>6.2.14</Version>
</PackageReference>
<PackageReference Include="StyleCop.MSBuild">
<Version>4.7.55</Version>
<Version>6.2.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Numerics.Vectors">
<Version>4.1.0</Version>
<Version>4.5.0</Version>
</PackageReference>
<PackageReference Include="System.Numerics.Vectors.WindowsRuntime">
<Version>4.0.0</Version>
<Version>4.3.0</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
2 changes: 1 addition & 1 deletion UnitTests/UAP.Tests/Chart.Tests/Chart.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.0.0</Version>
<Version>6.2.14</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.0.0</Version>
<Version>6.2.14</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
2 changes: 1 addition & 1 deletion UnitTests/UAP.Tests/Grid.Tests/Grid.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.0.0</Version>
<Version>6.2.14</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion UnitTests/UAP.Tests/Input.Tests/Input.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.0.0</Version>
<Version>6.2.14</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down