【问题标题】:How to find the location of the variable on which bind data column?如何找到绑定数据列的变量的位置?
【发布时间】:2012-09-20 14:21:34
【问题描述】:

如何找到绑定数据列的变量的位置?对 SOLUTION 的简单搜索失败。

<sdk:DataGridTextColumn MinWidth="15"
Binding="{Binding Accounts[0].AccountValue,
Converter={StaticResource DecimalConverter}}"
                          CanUserSort="False"
                          CellStyle="{StaticResource RightAlignCellStyle}"
                          Header="Account Value"
                          HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyleRight}"
                                            IsReadOnly="True" />

【问题讨论】:

  • 你能发布你的整个数据网格吗?
  • 您能否澄清“如何找到绑定数据列上的变量的位置?”这个问题?我不清楚你在找什么

标签: c# silverlight xaml mvvm


【解决方案1】:

找出 DataContext 的设置位置。它可以在对象本身或其任何父对象上。变量Accounts 应该是DataContext 对象的一个​​属性。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-06-25
    • 2015-11-07
    • 2020-05-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多