开发者

Data Binding ListBox in a User Control in the Silverlight Page

开发者 https://www.devze.com 2023-03-15 10:01 出处:网络
I have a user control that has a ListBox with a bunch of other controls. I need to be able to bind the ListBox control in the Si开发者_如何转开发lverlight Page.

I have a user control that has a ListBox with a bunch of other controls. I need to be able to bind the ListBox control in the Si开发者_如何转开发lverlight Page. I need to be able to do this, so that i can use my usercontrol on several different pages and bind it to different table on each page.

Any ideas of how this can be done?


You can expose a DP of type IEnumerable in your UserControl and, as you feel the property change, set your ListBox's ItemsSource to that property.

0

精彩评论

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

关注公众号