开发者

How to create sample data collection from my own class in expression blend 4?

开发者 https://www.devze.com 2023-01-12 06:46 出处:网络
Can anyone help me? it seems no way to do this in blend 4 开发者_开发技巧With Blend 4 open, go to Data tab.. hit the second icon from right(\"Create sample data\").. select \"Create sample data from c

Can anyone help me? it seems no way to do this in blend 4 开发者_开发技巧


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号