使用Telerik以Xamarin形式创建RadDataGrid

本文关键字:创建 RadDataGrid Xamarin Telerik 使用 | 更新日期: 2023-09-27 18:18:17

大家好,我是Xamarin Forms的新手。在问这个问题之前,我谷歌了很多,但找不到合适的答案。

我试图在Xamarin表单中创建一个piechart,为此我使用Nuget安装了Xamarin的Telerik UI。

代码:

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="DemoApp.DashboardPage" xmlns:telerikChart="clr-namespace:Telerik.XamarinForms.Chart;assembly=Telerik.XamarinForms.Chart">
<ContentPage.Content>
    <telerikChart:RadPieChart>
          <telerikChart:RadPieChart.Series>
            <telerikChart:PieSeries ItemsSource="{Binding Data}" ShowLabels="true">
                  <telerikChart:PieSeries.ValueBinding>
                    <telerikChart:PropertyNameDataPointBinding PropertyName="ProductQuantity"/>
                  </telerikChart:PieSeries.ValueBinding>
            </telerikChart:PieSeries>
          </telerikChart:RadPieChart.Series>
    </telerikChart:RadPieChart>
</ContentPage.Content>

但是当我运行时,我得到错误说"System. IO。filenotfoundxcexception 已经抛出。

谁能告诉我怎么解决这个问题?

使用Telerik以Xamarin形式创建RadDataGrid

如果这是一个Xamarin Forms应用程序,你必须在所有的项目中安装这个包,包括Forms项目和原生项目。

此错误通常是因为您只安装了可移植库包,而该包只是实际库的外观。