开发者

Programmatically setting a silverlight multi-select list box

开发者 https://www.devze.com 2023-01-07 12:41 出处:网络
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,

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

精彩评论

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