I have 5 static values I would like to populate in a ListPicker control, the one that ships with the Silverlight tool-kit. I would like to be able to crea开发者_开发知识库te these in Xaml and then reference them. I tried using ListPickerItems but the ToString() method does not return the name (which I essentially need). Is there a way of getting the x:name of these items or converting them to strings so I can get a string value back from the selected index.
These values will never change.
you could use ListPickerItems
in xaml, and set each one's DataContext
to the value you want. or some people use the Tag
field for holding some other data too.
精彩评论