开发者

Programmatically setting a silverlight multi-select list box

Is it possible to programatically set the values of a silverlight list box when the selection mode is "multiple"? The "SelectedItems" property is not settable, and "SelectedIndex" only works when the selection mode is "single开发者_Python百科".


Add items to SelectedItems collection:

myListBox.SelectedItems.Clear();
foreach(var item in selection)
    myListBox.SelectedItems.Add(item);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜