我在XAML中定义的ItemsControl的控制一个ItemsControl控件(WPF)的列如下:如何对齐
<ItemsControl BorderThickness="0" Name="SummaryList">
</ItemsControl>
在同一个XAML文件,我已经定义了以下DateTemplate在每个项目ItemsControl的:
<DataTemplate DataType="{x:Type app:UpgradeItem}">
<StackPanel Orientation="Horizontal">
<Label Margin="5,5" Content="{Binding Path=ItemText,Mode=OneTime}" />
<Label Margin="5,5" Content="{Binding Path=FromVersion,Mode=OneTime}" />
<Label Margin="5,5" Content="{Binding Path=ToVersion,Mode=OneTime}" />
</StackPanel>
</DataTemplate>
我已绑定ItemsControl的的的ItemSource到UpgradeItems的generlic列表(即列表)和编程执行过程中添加到这个列表。 ItemsControl控件中的项目正确填充,但列中的数据未对齐。我如何修改这个,以便三个单独的列(ItemText,FromVersion和ToVersion)对齐?
TIA