我做了一个longlistselector的控件,现在有个问题 我的样式 全部靠左,我现在想把红色代码处靠屏幕最右边 但是没效果
<phone:LongListSelector
x:Name="AddrBook"
JumpListStyle="{StaticResource AddrBookJumpListStyle}"
Background="Transparent"
GroupHeaderTemplate="{StaticResource AddrBookGroupHeaderTemplate}"
ItemTemplate="{StaticResource AddrBookItemTemplate}"
LayoutMode="List"
IsGroupingEnabled="true"
HideEmptyGroups ="true" SelectionChanged="AddrBook_SelectionChanged"/>
----------------------------------------------------------------------------
<DataTemplate x:Key="AddrBookItemTemplate">
<StackPanel x:Name="sp" VerticalAlignment="Top" Orientation="Horizontal">
<Image Source="{Binding Img}" Width="80" Height="80" HorizontalAlignment="Left" Margin="8" />
<StackPanel Orientation="Vertical">
<TextBlock x:Name="xtName" FontWeight="Bold" FontSize="25" Text="{Binding TName}" />
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="xsta" Text="{Binding State}" />
<TextBlock x:Name="xgpstime" Text="{Binding Gpstime}" HorizontalAlignment="Right" />
</StackPanel>
<TextBlock Text="{Binding Address}" />
</StackPanel>
</StackPanel>
</DataTemplate>
------解决方案--------------------
显然 你语法写错了。。。