如何创建类似轮播的控件?

发布于 2024-12-27 14:23:14 字数 110 浏览 2 评论 0 原文

我需要在我的 Windows Phone 7 应用程序中使用“类似轮播”控件,会有图像列表,我需要像 Pivot 中的项目一样切换它们。我应该使用什么控件? Pivot 非常相似,但我的应用程序中需要页脚。

I need a "Сarousel like" control in my windows phone 7 APP, there will be list of images and I need to switch them like items in Pivot. What control should I use? Pivot is very similar, but I need footer in my application.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

绝不服输 2025-01-03 14:23:15

您可以尝试使用此 Codeplex 项目 Silverlight Carousel Control 中的控件
并希望它不要使用任何非 WP7 功能。

You can try to use the control from this Codeplex project Silverlight Carousel Control
and hope it does not use any non-WP7 features.

无远思近则忧 2025-01-03 14:23:14

如果您(或任何其他人遇到这个问题寻找精美的 UI 元素)想要它更奇特一点,您也可以使用 Silverlight Flow Layouts Library 这是一个非常强大的轮播系统,带有专用的 WP7 二进制文件。我自己还没有在 WP7 上使用过它,但我已经在 WPF 上使用过它,它看起来不错,性能也很好。

If you(or anyone else stumbeling into this question hunting for fancy UI elements) want it a bit more fancy you could alternatively use the Silverlight Flow Layouts Library which is a very powerfull carousel system with a dedicated WP7 binary. I have not used this on WP7 yet my self, but I have used it with WPF and it both looks good and performs well.

白云悠悠 2025-01-03 14:23:14

您可以使用 Pivot 控件来隐藏标题,我在博客中介绍了此问题的简单解决方案:

带页面点的 Windows Phone 7 幻灯片视图

您可以在下面添加固定页脚这枢轴控制如下:

  <!--LayoutRoot is the root grid where all page content is placed-->
  <Grid x:Name="LayoutRoot" Background="#EAE5C7">
    <Grid.RowDefinitions>
       <RowDefinition/>
       <RowDefinition/>
    </Grid.RowDefinitions>

    <local:PivotLocationView Source="{Binding ElementName=pivot}"
                             HorizontalAlignment="Center"
                             VerticalAlignment="Bottom"
                             Margin="0,0,0,10"/>

    <controls:Pivot Margin="0,-30,0,40" 
                    x:Name="pivot">
      <controls:PivotItem>
      ...
      </controls:PivotItem>
      <controls:PivotItem>
        ...
      </controls:PivotItem>
      <controls:PivotItem>
        ...
      </controls:PivotItem>
    </controls:Pivot>

    <!-- your fixed footer goes here -->
    <Grid x:Name="footer" Grid.Row="1">
    </Grid>
  </Grid>

You can use a Pivot control where you hide the headers, I blogged about a simple solution to this problem here:

A Windows Phone 7 Slide View with Page Pips

You can add your fixed footer under the Pivot control as follows:

  <!--LayoutRoot is the root grid where all page content is placed-->
  <Grid x:Name="LayoutRoot" Background="#EAE5C7">
    <Grid.RowDefinitions>
       <RowDefinition/>
       <RowDefinition/>
    </Grid.RowDefinitions>

    <local:PivotLocationView Source="{Binding ElementName=pivot}"
                             HorizontalAlignment="Center"
                             VerticalAlignment="Bottom"
                             Margin="0,0,0,10"/>

    <controls:Pivot Margin="0,-30,0,40" 
                    x:Name="pivot">
      <controls:PivotItem>
      ...
      </controls:PivotItem>
      <controls:PivotItem>
        ...
      </controls:PivotItem>
      <controls:PivotItem>
        ...
      </controls:PivotItem>
    </controls:Pivot>

    <!-- your fixed footer goes here -->
    <Grid x:Name="footer" Grid.Row="1">
    </Grid>
  </Grid>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文