我在我的项目中使用了syncfusion图表。当我使用它与xamarin的droid项目时没有问题,但是当我添加UWP项目时,我遇到了问题。项目符合并且给出消息“namespacename.exe退出代码0”,窗口关闭。当我评论Xaml代码的syncfusion图时,没有问题。我已经在uwp项目和主项目中包含了用于uwp项目的syncfusion dll。我正在使用Xamarin Forms 2.0并使用版本14.2451.0.26。对于syncfusion DLL文件图表 请找代码片段:无法在UWP项目中显示Syncfusion图表
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:local="clr-namespace:EWSMobile;assembly=EWSMobile" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:controls="clr-namespace:XLabs.Forms.Controls;assembly=XLabs.Forms" xmlns:EWSMobile="clr-namespace:EWSMobile;assembly=EWSMobile"
xmlns:gauge="clr-namespace:Syncfusion.SfGauge.XForms;assembly=Syncfusion.SfGauge.XForms" xmlns:chart="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms" x:Class="EWSMobile.Dashboard" Title="Dashboard">
------------------
------------------
------------------
<chart:SfChart x:Name="ChartNews" IsVisible="{Binding IsVisibleNews}" IsEnabled="false" HeightRequest="270" BackgroundColor="#2a334f" VerticalOptions="FillAndExpand">
<chart:SfChart.Title>
<chart:ChartTitle Text="News Analysis" TextColor="White" />
</chart:SfChart.Title>
<chart:SfChart.PrimaryAxis>
<chart:CategoryAxis >
----------
</chart:CategoryAxis>
</chart:SfChart.PrimaryAxis>
<chart:SfChart.SecondaryAxis>
-------------
</chart:SfChart.SecondaryAxis>
<chart:SfChart.Series>
<chart:SplineSeries Label="Company" XBindingPath="Week" ItemsSource="{Binding Date}" Color="#8a40af" />
</chart:SfChart.Series>
</chart:SfChart>
-------------------
</ContentPage.Content>
</ContentPage>
请查看以下消息相同:
线程0x247c已退出,代码为0(为0x0)。 'EWSUWP.exe'(CoreCLR:CoreCLR_UWP_Domain):加载'匿名托管DynamicMethods程序集'。 线程0x2188已退出,代码为0(0x0)。 线程0x1190已退出,代码为0(0x0)。 程序'[2056] EWSUWP.exe'已退出,代码为0(0x0)。
使用他们的支持服务。 –
由于内存问题,似乎应用程序崩溃,需要增加堆内存大小或将内存分配给资源(图表)。 –