我有以下 XAML,旨在将行号放在左列中,但得到输出的只是0
<ListBox
VirtualizingPanel.VirtualizationMode="Recycling"
ItemsSource="{Binding MoineauPumpFlanks.Stator.Flank.Boundary, Mode=OneWay}"
AlternationCount="2147483647"
>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock
Text="{Binding RelativeSource={RelativeSource Mode=Self},
Path=(ItemsControl.AlternationIndex)}"
Margin="0,0,5,0"
/>
<!-- A custom control of mine -->
<Controls:LabelForPoint Point="{Binding}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
有人可以建议这里有什么问题吗?