Tuesday, 1 October 2013

DesignTime Data

DesignTime Data

I have an ItemsControl that is bound at runtime to data fetched from the
web. but I'd like to be able to preview its item template in the visual
designer. I'm able to do this in WPF, but not in windows phone.
I've tried to check for DesignerProperties.IsInDesignTool in the
constructor of the page and if true add the items manually to the items
control, but it doesn't work.
I considered having a static resource with a list of items and binding to
it, but there's no <x:Array> in windows phone also.
I also tried setting ItemsSource="{d:DesignInstance
IsDesignTimeCreatable=True, Type=src:MyType, CreateList=True}" but it also
didn't work

No comments:

Post a Comment