如何在表达式混合 4 中从我自己的类创建示例数据集合?

发布于 2024-09-14 09:38:21 字数 34 浏览 1 评论 0原文

谁能帮助我吗?在 Blend 4 中似乎无法做到这一点

Can anyone help me? it seems no way to do this in blend 4

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夜雨飘雪 2024-09-21 09:38:21

打开 Blend 4,转到“数据”选项卡。点击右侧第二个图标(“创建示例数据”)。选择“从类创建示例数据...”并选择您的类。这将生成示例数据源。您可以将控件绑定到此数据源,以在 Blend 设计器中查看填充有示例的控件。 HTH。

With Blend 4 open, go to Data tab.. hit the second icon from right("Create sample data").. select "Create sample data from class.." and select your class. This will generate sample data source. You can bind your controls to this data source to see the controls filled with sample in Blend designer. HTH.

强辩 2024-09-21 09:38:21

我现在使用的方法(尽管确实不太完美)是创建一个虚拟类,其中包含原始类的项目列表。即:

class We_Want_Items_Of {}
class Dummy_Class { List<We_Want_Items_Of> Test {get;set;}}

然后您可以为 Dummy_Class 创建一个示例数据,其中将包含 We_Want_Items_Of 的列表。然后,您可以将该列表用作列表框等的数据源。

The method I'm using now - although really less than perfect - is by creating a dummy class which contains a list of items of the original class. I.e.:

class We_Want_Items_Of {}
class Dummy_Class { List<We_Want_Items_Of> Test {get;set;}}

Then you can create a sample datum for the Dummy_Class, which will contain a list of We_Want_Items_Of's. You can then use that list as a data source for, for instance, a ListBox.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文