开发者

Making ListPickerItems strings or geting the x:name of the SelectedIndex()

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜