Blend 无法为许多内在类型生成样本数据 [英] Blend cannot generate sample data for many intrinsic types
问题描述
看起来 Blend (2015) 无法为某些数据类型生成样本值.对我来说失败的类型包括 short
和 byte
.生成样本值的类型是 string
、int
和 bool
.有没有其他人遇到过这种情况,是否有解决此限制的方法?
It looks like Blend (2015) cannot generate sample values for certain data types. The types that failed for me include short
and byte
. The types that generated sample values are string
, int
and bool
. Has anyone else experienced it and is there a workaround for this limitation?
示例:
以下类没有生成正确的样本数据:
The following class doesn't generate correct sample data:
public partial class PointLocation
{
public byte Number { get; set; }
public short X { get; set; }
public short Y { get; set; }
}
样本数据看起来像(注意没有样本值):
Sample data looks like (notice there are no sample values):
<VM:PointLocation>
<VM:PointLocation.Number>
<System:Byte/>
</VM:PointLocation.Number>
<VM:PointLocation.X>
<System:Int16/>
</VM:PointLocation.X>
<VM:PointLocation.Y>
<System:Int16/>
</VM:PointLocation.Y>
</VM:PointLocation>
但是如果只是将这些属性的数据类型改为int
:
But if simply change the data type of these properties to int
:
public partial class PointLocation
{
public int Number { get; set; }
public int X { get; set; }
public int Y { get; set; }
}
示例数据如下:
<VM:PointLocation Number="79" X="30" Y="68" />
推荐答案
我注意到了同样的事情.您可以手动编辑生成的示例数据并自行添加值.
I have noticed the same thing. You can manually edit the generated sample data and add values yourself.
这篇关于Blend 无法为许多内在类型生成样本数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!