C1FlexPie更新数据时图形变化数字不变
本帖最后由 studynew 于 2020-8-4 09:35 编辑this.Pie1.ItemsSource = GenDemoData();
private List< PieData> GenDemoData()
{
List< PieData> list = new List< PieData>();
for (int i = 0; i < 4; i++)
{
list.Add(new PieData("Item " + (i + 1), rnd.Next(1000)));
}
return list;
}
public class PieData
{
private string name = string.Empty;
private int count = 0;
public PieData(string name, int count)
{
this.name = name;
this.count = count;
}
public string Name
{
get
{
return name;
}
set
{
name = value;
}
}
public int Count
{
get
{
return count;
}
set
{
count = value;
}
}
}
MainWindow.xaml中
<c1:C1FlexPie x:Name=" Pie1" Binding="Count" BindingName="Name">
<c1:C1FlexPie.DataLabel>
<c1: PieDataLabel Content="{}{y}" Position="Outside"/>
</c1: C1FlexPie.DataLabel>
</c1:C1FlexPie>
已经打开和运行了项目,看起来代码没有问题,我这里测试也是可以正常刷新的
目前我测试使用的版本是4.5.20202.716,具体是不是新老版本的问题还要确认,我建议你还是再去确认一下如问题,以及重现方法
页:
[1]