2
내 xaml에는 내부적으로 상단에 몇 가지 컨트롤 (예 : wrappanel 및 Buttons)이있는 ItemControl이 있습니다. 사용자가 버튼을 클릭하면 itemindex를 어떻게 알 수 있습니까?ItemsControl에서 선택된 항목의 인덱스
<ItemsControl ItemsSource="{Binding ConditionList}" AlternationCount="{Binding ConditionList.Count}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<WrapPanel Background="#FFB1CBCB">
<ComboBox ItemsSource="{Binding DataContext.NodeMembershipFunction, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}, AncestorLevel=1}}" DisplayMemberPath="_Name" SelectedValue="{Binding Condition, Mode=TwoWay}" SelectedValuePath="_Type"></ComboBox>
<Button Content="Remove" Click="Remove_Click" />
</WrapPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
명부에있는 품목 색인? ConditionList? – stsur