如何绑定到已过滤或分组的 Sketchflow 示例数据?
我在 Sketchflow 原型(这是一个 Silverlight 项目)中创建了一些示例数据作为 StaticResource。我想在将示例数据绑定到网格视图进行显示之前对其进行过滤或分组。
如何获取 C# 代码隐藏文件中的示例数据,以便在显示之前对其进行过滤或分组?
I've created some sample data as a StaticResource in a Sketchflow prototype (this is a Silverlight project). I want to filter or group-by the sample data before binding it to a gridview for display.
How do I get at the sample data in my C# codebehind files in order to filter or group-by it before display?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样的东西:
var sds = this.Resources["SampleDataSource"] as SampleDataSource;
这在我的 SketchFlow SL 项目中适用于以下条件:
1.我的示例数据名为SampleDataSource
2. 示例数据位于应用程序级别(但这也应该适用于文档级别)
一旦获得 sds 对象,您就可以修改 Collection 属性(或您在示例数据中命名的片段)。
Something like this:
var sds = this.Resources["SampleDataSource"] as SampleDataSource;
This works in my SketchFlow SL project under the following conditions:
1. My sample data is named SampleDataSource
2. Sample data is at the application level (this should work for document level as well however)
Once you have the sds object, you can modify the Collection property (or whatever you named the pieces in your sample data).