日照香炉生紫烟~
2021-10-27 15:40
采纳率: 100%
浏览 27

关于WPF中Binding绑定的数据获取不到

之前的工程师通过DataReportTestResultConverter和DataReportMaintenanceConverter来添加循环添加数据

<UserControl.Resources>
        <local:DataReportTestResultConverter x:Key="DataReportTestResultConverter"/>
        <local:DataReportMaintenanceConverter x:Key="DataReportMaintenanceConverter"/>
    </UserControl.Resources>

数据绑定是这样的

 <DataGridTextColumn x:Name="columnHeader5" CanUserSort="False" CanUserReorder="False" Header="实验结论" ElementStyle="{StaticResource DataGridTextCenter}" Width="*">
                        
                        <DataGridTextColumn.Binding>
                            <MultiBinding Converter="{StaticResource ResourceKey=DataReportTestResultConverter}">
                                <Binding Path="StartVoltage"/>
                                <Binding Path="EndVoltage"/>
                                <Binding Path="dicLanguages"/>
                            </MultiBinding>
                        </DataGridTextColumn.Binding>
                    </DataGridTextColumn>

                    <DataGridTextColumn x:Name="columnHeader6" CanUserSort="False" CanUserReorder="False" Header="维护方案" ElementStyle="{StaticResource DataGridTextCenter}" Width="*">
                        <DataGridTextColumn.Binding>
                            <MultiBinding Converter="{StaticResource ResourceKey=DataReportMaintenanceConverter}">
                                <Binding Path="StartVoltage"/>
                                <Binding Path="EndVoltage"/>
                            </MultiBinding>
                        </DataGridTextColumn.Binding>
                    </DataGridTextColumn>


就是这两列下的数据我在Datatable中怎么找都找不到,我要通过什么方法获取到呢

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题