I have a simple class with a property List Photos. You know by default in many sample of code you find a sampledata. Each time, it presents a simple property as a string. This sampledata is used to populate the designer and you can see the render without to compile.
So I try to find a way to have a sampledata with a List filled.
I try to use the functionnality from Blend permitting to generate data but it doesn't work with List.
You can see below the code generate. It miss the property List.
And I don't find any documentation explaning clearly the binding in details.
<ViewModels:ItemViewModel xmlns:ViewModels="clr-namespace:RssReader.ViewModels"
Description="Aliquam aenean integer quisque mauris"
Link="Maecenas vivamus"
Title="Praesent curabitur aliquam nullam phasellus"/>
My assumption is I need to add something as
<ViewModels:ItemViewModel xmlns:ViewModels="clr-namespace:RssReader.ViewModels"
Description="Aliquam aenean integer quisque mauris"
Link="Maecenas vivamus"
Title="Praesent curabitur aliquam nullam phasellus"
<Photos x:Key="strings" Type="sys:List"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<sys:String>Photos1</sys:String>
<sys:String>Photos2</sys:String> >
</Photos>
But it's not the correct syntax. Can you provide an help to solve it.
This topic is link to the subject Databinding List<Object> WindowsPhone
Best regards,
Alexandre
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…