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?
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).
精彩评论