Windows Phone 上 ListBox 上的 Tiles 缩小效果
我创建了一个像这样的列表框,
<ListBox Name="lstNews" SelectionChanged="lstNews_SelectionChanged">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<toolkit:WrapPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,12,12" Width="180" Height="180">
<Grid.Background>
<ImageBrush>
<ImageBrush.ImageSource>
<BitmapImage CreateOptions="BackgroundCreation" UriSource="{Binding Picture}" />
</ImageBrush.ImageSource>
</ImageBrush>
</Grid.Background>
<StackPanel Background="#AA000000" VerticalAlignment="Bottom" Height="70" >
<TextBlock Foreground="White" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="16" Text="{Binding Title}" />
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
当用户点击某个项目时,我需要添加缩小效果。我见过很多应用程序这样做,我不知道如何。
I've created a listbox like this
<ListBox Name="lstNews" SelectionChanged="lstNews_SelectionChanged">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<toolkit:WrapPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,12,12" Width="180" Height="180">
<Grid.Background>
<ImageBrush>
<ImageBrush.ImageSource>
<BitmapImage CreateOptions="BackgroundCreation" UriSource="{Binding Picture}" />
</ImageBrush.ImageSource>
</ImageBrush>
</Grid.Background>
<StackPanel Background="#AA000000" VerticalAlignment="Bottom" Height="70" >
<TextBlock Foreground="White" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="16" Text="{Binding Title}" />
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
I need to add a shrinking effect when the user taps on an item. I've seen a lot of apps do that, I dunno how.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您正在谈论倾斜效果,可以在 wp7 工具包中找到该效果。
您可以通过这样做在全局级别设置它,
一些好的 教程。
I assume you are talking about the tilt effect, which can be found in the wp7 toolkit.
You can set it at the global level by doing this,
Some good tutorials.