在silverlight怎么获取ListBox中的值

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/03 16:14:13
在silverlight怎么获取ListBox中的值

在silverlight怎么获取ListBox中的值
在silverlight怎么获取ListBox中的值

在silverlight怎么获取ListBox中的值
看你的ListBox值如何绑定的
如果是通过模板,然后复制给ItemsSource的话,就直接通过ItemsSource属性就能访问到ListBox中的所有项
如果是自己创建ListBoxItem然后添加的话
就通过访问ListBox的Items属性.