【问题标题】:Fix the Scrolling of Hub Control in Windows phone 8.1修复 Windows phone 8.1 中集线器控件的滚动问题
【发布时间】:2016-02-14 18:49:17
【问题描述】:

我在我的 Windows Phone 8.1 WinRT 应用程序中使用了 Hub 控件。

我正在动态填充 HubSection。

一旦我到达第一个 Hub 部分,我不想去最后一个 Hub 部分,同样的事情适用于 Last Hub 部分。

Hub 的默认行为是从第一个 Hub 部分滚动到最后一个 Hub 部分。

请帮忙!!

【问题讨论】:

    标签: c# asp.net xaml windows-phone-8.1 winrt-xaml


    【解决方案1】:

    我猜你正在寻找 FlipView 使用 FlipViewItem 在其中添加内容。

    希望对您有所帮助! :)

    【讨论】:

      【解决方案2】:

      如果你有类似的方法 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 将具有移入视图和移出视图的部分。

      如果您从 Last 到 First,您可以尝试滚动到最后一部分,例如 panHub.ScrollToSection(LastSection);

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多