我正在做一个WPF用户控件,并且我想要在绑定的意义上与DataGrid控件类似的行为。我的问题是:DataGrid如何知道如何绑定到IEnumerable类型的任何集合?例如:您可以将一个DataView作为ItemsSource传递,并且您还可以传递任何对象集合。 DataGrid中如何确定是否只有看着这个绑定到数据视图的列,或对象的属性:提前DataGrid如何绑定到任何集合的属性?
<DataGridTextColumn Binding="{Binding **Path=SomePropertyOrColumn**}"/>
感谢。
选中此http:// stackoverflow。com/questions/5488014/in-wpf-are-binding-path-and-binding-really-equal,http://stackoverflow.com/questions/3504480/when-to-use-path-in-wpf-binding和http://stackoverflow.com/questions/4742449/new-to-wpf-data-binding –
@Sandeep GB这不是我的问题。我知道如何进行绑定,我想知道DataGrid如何与任何对象共享内存。 – Vale