WPF中的binding(五)- 使用DataTable做爲Binding的源

1、DataTable的DefaultView屬性賦值給ListBox等派生自ItemsControl類的對象。 XAML文件以下,咱們設置ListBox的DisplayMemberPath爲Name,這樣會在ListBox的列表中顯示DataTable對應的Name列:html <Window x:Class="_6_18.MainWindow" xmlns="http://sc
相關文章
相關標籤/搜索