【问题标题】:How to create pull to refresh feature in windowsphone Pivot?如何在 windowsphone Pivot 中创建下拉刷新功能?
【发布时间】:2015-02-02 21:56:46
【问题描述】:

我正在制作一个 rss 应用程序,我想在数据透视项上包含拉动刷新功能,而不是单独的刷新按钮。我尝试了不同的鼠标事件处理程序,但它们不能正常工作。有什么想法吗?

【问题讨论】:

    标签: xaml windows-phone-7 windows-phone-8 pivotviewer


    【解决方案1】:

    我建议您将 Telerik 的 RadDataBoundListBox 与 PivotItem 一起使用

    <phone:PivotItem Header="Title" Foreground="Black">
    <telerikPrimitives:RadDataBoundListBox>
        <telerikPrimitives:RadDataBoundListBox.PullToRefreshIndicatorStyle>
            <Style TargetType="telerikListBox:PullToRefreshIndicatorControl">
               <Setter Property="RefreshTimeLabelFormat" Value="last refresh time:{0:H:mm}"/>
            </Style>
        </telerikPrimitives:RadDataBoundListBox.PullToRefreshIndicatorStyle>
    </telerikPrimitives:RadDataBoundListBox>
    


    另外我建议您在手机上下载 Telerik WP 控件http://www.telerik.com/products/windows-phone.aspx#Demo

    【讨论】:

    • 不错,但没有实际用途,除非您购买整个套件。显示持续购买警报。
    【解决方案2】:

    我创建了一个实现“拉动刷新”功能和“按需加载数据”的简单控件,您可以在nuget 中找到它,从this blog post 中了解它。适用于 Windows 8 和 Windows Phone 8.1

    【讨论】:

    • 嘿,这似乎是一个不错的软件包,但你能把它降级并允许 windowsphone-8。
    猜你喜欢
    • 1970-01-01
    • 2012-06-07
    • 2015-05-14
    • 2018-01-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-01
    相关资源
    最近更新 更多