6
我有一個longlistselector,並在這個longlistselector中添加了某些圖像。 我也改變了這個圖像的邊緣,使圖像上升或下降,等等。 但我想把這個圖像infront的另一個圖像在這個longlistselector。我曾嘗試使用Canvas.Zindex。 我已經嘗試在網格級別,圖像級別和longlistselector的最高級別設置它()但它仍然不起作用。有人有一些想法嗎?你可以找到波紋管我的代碼:提前如何在longlistselector中設置datatemplate的zindex
<phone:LongListSelector
x:Name="SouthLongListselector"
VerticalAlignment="Bottom"
ItemsSource="{Binding Cards}"
Canvas.ZIndex="{Binding Layer}"
SelectionChanged="SouthLongListselector_SelectionChanged"
LayoutMode="Grid"
GridCellSize="50,200"
Margin="0,0,0,-26"
>
<phone:LongListSelector.ItemTemplate >
<DataTemplate>
<Grid
Background="Transparent"
Margin="{Binding GridOffset}"
Height="150"
Width="110"
>
<!-- add image here-->
<Image
Source="{Binding Image}"
>
</Image>
</Grid>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
感謝,