[英]WPF no setter for datagrid.ItemsSource. How to bind it to a multibinding
I need to bind a datagrids itemsource to a multibinding, I found examples like this: using "ctrl:datagrid.ItemsSource>" 我需要将数据网格项目源绑定到多重绑定,我发现了这样的示例: 使用“ ctrl:datagrid.ItemsSource>”
However nowhere is it explained how to access the datagrid.ItemsSource property in the xaml What class needs to be written in the namespace "ctrl" in the above example? 但是,没有地方说明如何访问xaml中的datagrid.ItemsSource属性。在上面的示例中,需要在名称空间“ ctrl”中编写什么类?
If the question is about the System.Windows.Controls.DataGrid
, you would write it without a XAML namespace prefix: 如果问题是有关System.Windows.Controls.DataGrid
,则您可以编写没有XAML名称空间前缀的问题:
<DataGrid ...>
<DataGrid.ItemsSource>
<MultiBinding Converter="...">
<Binding ... />
<Binding ... />
</MultiBinding>
</DataGrid.ItemsSource>
</DataGrid>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.