修复 Windows phone 8.1 中 Hub 控件的滚动问题
Fix the Scrolling of Hub Control in Windows phone 8.1
我在 Windows Phone 8.1 WinRT 应用程序中使用了 Hub 控件。
我正在动态填充 HubSections。
我不想在到达第一个 Hubsection 后转到最后一个 Hubsection,同样的事情适用于 Last Hubsection。
Hub 的默认行为是从第一个 Hubsection 滚动到最后一个 Hubsection。
请帮忙!!
如果你有类似的方法
panHub_SectionsInViewChanged(对象发送者,SectionsInViewChangedEventArgs e)
在你的 xaml 中你有:
<Hub x:Name="panHub" Style="{StaticResource HubPanoramaStyle}" Margin="0, 0, 0, 0"
SectionsInViewChanged="panHub_SectionsInViewChanged" Loaded="panHub_Loaded" Grid.RowSpan="2">
然后 SectionsInViewChangedEventArgs e 将包含移入视图和移出视图的部分。
如果您要从最后一节转到第一节,您可以尝试滚动到最后一节,例如 panHub.ScrollToSection(LastSection);
我猜你正在寻找 FlipView add content in it using FlipViewItem。
希望对您有所帮助! :)
我在 Windows Phone 8.1 WinRT 应用程序中使用了 Hub 控件。
我正在动态填充 HubSections。
我不想在到达第一个 Hubsection 后转到最后一个 Hubsection,同样的事情适用于 Last Hubsection。
Hub 的默认行为是从第一个 Hubsection 滚动到最后一个 Hubsection。
请帮忙!!
如果你有类似的方法 panHub_SectionsInViewChanged(对象发送者,SectionsInViewChangedEventArgs e) 在你的 xaml 中你有:
<Hub x:Name="panHub" Style="{StaticResource HubPanoramaStyle}" Margin="0, 0, 0, 0"
SectionsInViewChanged="panHub_SectionsInViewChanged" Loaded="panHub_Loaded" Grid.RowSpan="2">
然后 SectionsInViewChangedEventArgs e 将包含移入视图和移出视图的部分。
如果您要从最后一节转到第一节,您可以尝试滚动到最后一节,例如 panHub.ScrollToSection(LastSection);
我猜你正在寻找 FlipView add content in it using FlipViewItem。
希望对您有所帮助! :)