【发布时间】:2013-11-18 12:59:04
【问题描述】:
我正在尝试使用 c# 和 xaml 为 windows 商店做新闻应用程序..
在这个项目中,我创建了一个类似于 windows phone 8 的 Panorama GridView.. 在这个 Panorama GridView 内部,我为分类创建了小的 gridviews..
Document Online的结构是这样的;
-<Grid> (whole page)
-<Grid> (Header/Logo etc.)
-<PanoramaGridView> (All cath will be under of this)
-<HotNewsGridView>
-<HotNewsGrid>
-<GroupHeaderTextBlock>
-<HotGridView>
-<SportNewsGridView>
-<PoliticsGridView>
-<GalleryGridView>
代码的第一面..
<GridView x:Name="PanoramaGridView"
Grid.Row="1"
Style="{StaticResource GridViewStyle1}"
ItemContainerStyle="{StaticResource GridViewItemStyle2}">
<GridViewItem Margin="0,0,2,0" VerticalAlignment="Top">
<Grid Margin="30,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="80"/>
<RowDefinition/>
</Grid.RowDefinitions>
<GridView x:Name="HotNewsGrid"
ItemsSource="{Binding}"
ItemTemplate="{StaticResource MansetItemTemplate}"
Grid.Row="1"
SelectionChanged="HotNewsGrid_SelectionChanged"/>
<TextBlock x:Name="GroupHeaderTextBlock"
HorizontalAlignment="Left"
Margin="0,0,-7,-18"
Grid.RowSpan="1"
TextWrapping="Wrap"
Text="Hot News"
Foreground="DarkGreen"
VerticalAlignment="Top"
Style="{StaticResource SubheaderTextStyle}"/>
</Grid>
问题是,当我的鼠标光标位于“HotNewsGrid”网格上时,我无法滚动。我只能从应用程序的顶部和底部滚动..
我认为,我的 PanoramaGridView 可以滚动,但是当我的光标到达 subgridviews(如热门新闻 gridview)时,它会停止滚动,无法从中滚动。我试图把 IsSwipeEnable、ScrollViewer.HorizontalScrollMode="Enabled" 等。没有工作..
我不想滚动“HotNewsGrid”。我只想在光标出现时继续滚动..
我希望你能理解我.. 这对我来说是一个非常大的问题.. 等待您的帮助..
谢谢你..
【问题讨论】:
标签: c# xaml windows-8 windows-store-apps