item template in stack panel


i feel i'm close on 1 can't quite it.

i want have empty stack panel, user selects items control add representation of item stack panel - item added compostie of say, check box, a label , image.

i need able dynamically add , remove the items stack panel , don't mind (actually rater) solutuion code driven rather buch of complicated classes.

i've used datatemplates have custom items in data grid, , seem recall itemtemplate brain fried @ point... ;)

create custom object contains data want display in datatemplate.

ex.  object something, has imageuri, title , boolean of sort.

when add items, store these in collection of custom type in viewmodel bound ui element.  in datatemplate bind each property value desired ui element.  update collection on view model, changes propogate ui , vice versa long binding set 2 way binding.

here's example using listbox itemtemplate , building custom stack panels want.  datasource custom collection , see binding each property on custom type held in datasource collection (your list on viewmodel)

http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-5-using-the-listbox-and-databinding-to-display-list-data.aspx

blessings,

jeff



Silverlight  >  Getting Started with Silverlight



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........