vb.net - Display data in accordion in silverlight - data not displaying -
environment : silverlight 4.0
i binding info silverlight accodion command not displaying info code follows :
<layout:accordion horizontalalignment="left" name="accordion1" width="761" height="205" background="skyblue" verticalalignment="top" margin="32,404,0,0"> <layout:accordion.itemtemplate> <datatemplate> <stackpanel> <textblock text="{binding itrusername}" /> </stackpanel> </datatemplate> </layout:accordion.itemtemplate> <layout:accordion.contenttemplate> <datatemplate> <textblock text="{binding itrusername}" /> </datatemplate> </layout:accordion.contenttemplate> </layout:accordion>
xaml.cs :
accordion1.itemssource = itrdescriptionlist
public property _itrdescription new list(of itrdescription) public property itrdescriptionlist() list(of itrdescription) homecoming _itrdescription end set(byval value list(of itrdescription)) _itrdescription = value end set end property public class itrdescription private property _itrdescription string public property itrdescription() string homecoming _itrdescription end set(byval value string) _itrdescription = value end set end property private property _itrdate string public property itrdate() string homecoming _itrdate end set(byval value string) _itrdate = value end set end property private property _itrusername string public property itrusername() string homecoming _itrusername end set(byval value string) _itrusername = value end set end property end class
i want display info in next image :
you need bind new collection of itrdescriptionlist, containing values, rather straight property itself.
as example, seek putting in public sub new() in xaml.cs, under initializecomponent()
public sub new() initializecomponent() itrdescriptionlist = new list(of itrdescription) itrdescriptionlist.add(new itrdescription {.itrdate = date.today, .itrdescription = "test description", .itrusername = "joe bloggs"}) accordion1.itemssource = itrdescriptionlist end sub
vb.net silverlight-4.0 accordion silverlight-toolkit
No comments:
Post a Comment