我正在开发window phone 7应用程序。我是新来的银光。我正在动态创建按钮控件并将这些所有按钮控件绑定到列表框。如何对齐列表框控件最左边的按钮?
<ListBox x:Name="lstButtons" Margin="393,-28,-12,28" Background="Orange">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Button Content="{Binding ElementName}" Width="100" HorizontalAlignment="Right"></Button>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
现在我想显示在最左侧的按钮控制装置,我想显示接近列表框的左侧边框的按钮控制。我想显示左侧对齐的按钮控件。用我的上面的代码,按钮控件出现在列表框的中间位置?我应该如何将它与左边对齐?你能否给我提供任何可以解决上述问题的代码或链接?如果我做错了什么,请指导我。