获取UWP中PullRefreshProgressControl的进度值

时间:2016-08-27 19:19:59

标签: xaml uwp

如何在代码中获取进度值? 这是XAML:

 <ptr:PullToRefreshBox x:Name="ptrBox" HorizontalAlignment="Center" VerticalAlignment="Top" RefreshInvoked="ptrBox_RefreshInvoked">
            <ScrollViewer>
                <StackPanel Name="SPMain" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
                </StackPanel>
            </ScrollViewer>
            <ptr:PullToRefreshBox.TopIndicatorTemplate>
                <DataTemplate>
                    <ptr:PullRefreshProgressControl Name="ProgressPTR" Progress="300" PullToRefreshText="Pull to refresh" ReleaseToRefreshText="Release"/>
                </DataTemplate>
            </ptr:PullToRefreshBox.TopIndicatorTemplate>
        </ptr:PullToRefreshBox>

1 个答案:

答案 0 :(得分:2)

请写下这个

Progress="{Binding}" 

取代Progress="300"