小编use*_*121的帖子

WPF MVVM依赖项属性

我有以下情况:

  1. 我有一个用户控件,里面只有一个Grid.
  2. Grid的第一列是复选框列,它绑定到CustomerModel的IsSelected属性
  3. Grid的ItemsSource绑定到List <CustomerModel>
  4. 当用户检查任何CheckBox时,CustomerModel的相应IsSelected属性正在更新

查询:

  1. 我向UserControl添加了一个名为"SelectedCustomerItems"的依赖属性,我希望它返回一个List <CustomerModel>(仅用于IsSelected = true)

  2. 此UserControl放在另一个窗口上

  3. 依赖属性"SelectedCustomerItems"绑定到WindowViewModel中的"SelectedCustomers"属性

但我没有通过此依赖项属性获取SelectedCustomer项.断点没有打到Get {}请建议....

wpf dependency-properties mvvm wpf-controls

1
推荐指数
1
解决办法
3806
查看次数

标签 统计

dependency-properties ×1

mvvm ×1

wpf ×1

wpf-controls ×1