我在WPF中有一个数据集,我在其中一个列中使用一个自定义的多选择用户控件,如下所示:
<DataGridTemplateColumn x:Name="APIColumnMulti" Width="auto" Header="Wirkstoff" <DataGridTemplateColumn.CellTemplate> <DataTemplate> <usercontrols:MultiSelectCell x:Name="multiSelect1" Title="Wirkstoffe" ChosenItems="{Binding ActiveIngredients, UpdateSourceTrigger=PropertyChanged}" IsTemplateRow="{Binding IsTemplate, UpdateSourceTrigger=PropertyChanged}" ItemsSource="{Binding AllActiveIngredientsList, RelativeSource={RelativeSource AncestorType=UserControl}, UpdateSourceTrigger=PropertyChanged}"