我想在 AutoGeneratingColumn 事件中执行此操作:
<my:DataGridTextColumn Header="CompanyName">
<my:DataGridTextColumn.Binding>
<Binding Path="CompanyName">
<Binding.ValidationRules>
<local:DataRowValidation ValidationStep="UpdatedValue" />
</Binding.ValidationRules>
</Binding>
</my:DataGridTextColumn.Binding>
</my:DataGridTextColumn>
可能吗?这些列是自动生成的,所以我只想将 ValidationRules 添加到 Binding。