Windows 8 Metro Style应用程序 - GridView的查看问题? [英] Windows 8 Metro Style Apps - GridView's View Problem?
本文介绍了Windows 8 Metro Style应用程序 - GridView的查看问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
各位大家好,我正在努力开发一个电视节目画廊,但我陷入了gridview的视野。
我想把它展示在底部;
http://i42.tinypic.com /n5hahz.png [ ^ ]
我创建了一个数据模板,但它显示在一行不像图片。
我应该采取什么步骤吗?
DataTemplate代码;
Hello everybody, i'm trying to develop a tv show gallery but im stuck in gridview's view.
I'd like to show it like the picture at bottom;
http://i42.tinypic.com/n5hahz.png[^]
I've created a datatemplate but it shows on a single line not like the picture.
What steps should i do?
DataTemplate code;
<DataTemplate x:Key="ShowTemplate">
<Grid HorizontalAlignment="Left" removed="{StaticResource ApplicationPageBackgroundThemeBrush}" Width="344" Height="554">
<Grid Margin="0,10,0,0">
<Image HorizontalAlignment="Left" Height="450" Margin="10,10,0,-40" VerticalAlignment="Top" Width="324" Stretch="Fill" Source="Images/72233-3.jpg"/>
<TextBlock HorizontalAlignment="Center" Margin="10,465,10,10" TextWrapping="Wrap" Text="{Binding ShowName}" VerticalAlignment="Center" FontSize="30" TextAlignment="Center" FontWeight="Bold" Width="314" Height="62" Foreground="{StaticResource ApplicationForegroundThemeBrush}" Style="{StaticResource ItemTitleStyle}"/>
<Image HorizontalAlignment="Left" Height="47" VerticalAlignment="Top" Width="100" Source="Images/badge.png"/>
<TextBlock HorizontalAlignment="Left" Margin="15,4,0,0" TextWrapping="Wrap" Text="{Binding Count}" VerticalAlignment="Top" Height="37" Width="61" FontWeight="Bold" FontSize="30" TextAlignment="Center" Foreground="{StaticResource ApplicationForegroundThemeBrush}" Style="{StaticResource ItemSubtitleStyle}" />
</Grid>
</Grid>
</DataTemplate>
</Page.Resources>
for gridview;
for gridview;
<StackPanel Grid.Row="1" Margin="10,10,0,0">
<GridView x:Name="gridShows" removed="{StaticResource ApplicationPageBackgroundThemeBrush}"
ItemTemplate="{StaticResource ShowTemplate}"
BorderBrush="LightGray"
VerticalAlignment="Top"
BorderThickness="1" ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto" SelectionMode="None"/>
</StackPanel>
推荐答案
如图所示,显示鼠标悬停在其上方的尺寸大于原始尺寸。
因此,逻辑上在网格外创建一个图像控件,并将图像源关联到网格项的相对源。
我认为这应该有效。
As the pictures indicate show that on mouse over it has a size greater than the original size.
Hence, logically create a image control outside of the grid, and associate the image source to the relative source of the grid item.
I think that should work.
这篇关于Windows 8 Metro Style应用程序 - GridView的查看问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文