Blend cannot generate sample data for many intrinsic types

风流意气都作罢 提交于 2019-12-13 02:26:02

问题


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?

Example:

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>

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; }
}

The sample data looks like:

<VM:PointLocation Number="79" X="30" Y="68" />

回答1:


I have noticed the same thing. You can manually edit the generated sample data and add values yourself.



来源:https://stackoverflow.com/questions/37096781/blend-cannot-generate-sample-data-for-many-intrinsic-types

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!