WP8在Pivot内部进行刷新

时间:2013-12-19 15:06:33

标签: c# windows-phone-8 telerik refresh pivot

我正在尝试在WP8中RadControl内的Telerik中添加一个Pull to Refresh PivotItem

这是代码:

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

错误讯息:

  

属性'PullToRefreshIndicatorStyle'在类型上不存在   XML命名空间中的“PivotItem”

     

找不到可附加属性'PullToRefreshIndicatorStyle'   输入'RadDataBoundListBox'。

     

无法识别或不识别成员“PullToRefreshIndicatorStyle”   访问。

如何在PivotItem控件中使用它?

1 个答案:

答案 0 :(得分:3)

看起来你错过了一些标签。你不应该在枢轴项目中定义telerik Primitives:RadDataBoundListBox吗?'

像这样:

<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>
</phone:PivotItem>