首页 Windows windows-phone-7 – 如何将SystemTray Progressbar绑定到选定PivotItem Da

windows-phone-7 – 如何将SystemTray Progressbar绑定到选定PivotItem Da

我有一个带有Pivot和3个PivotItems的应用程序.每个PivotItem都有自己的DataContext,DataContext有一个名为IsLoading的属性. 可以将SystemTray.ProgressIndicator IsVisible属性绑定到选定的pivotitem DataContext.IsLoading属性? 这是我尝试过的: shell:Sys

我有一个带有Pivot和3个PivotItems的应用程序.每个PivotItem都有自己的DataContext,DataContext有一个名为IsLoading的属性.

可以将SystemTray.ProgressIndicator IsVisible属性绑定到选定的pivotitem DataContext.IsLoading属性?

这是我尝试过的:

<shell:SystemTray.ProgressIndicator>
    <shell:ProgressIndicator 
       IsVisible="{Binding ElementName=pivot,Path=SelectedItem.DataContext.IsLoading}" />
</shell:SystemTray.ProgressIndicator>
<Grid Background="Transparent">
    <controls:Pivot x:Name="pivot">

        <controls:PivotItem Header="pivot item"
                                Margin="0,28,24,0"
                                DataContext="{Binding DCOne}" />

        <controls:PivotItem Header="pivot item"
                            Margin="0,0"
                            DataContext="{Binding DCTwo}" />

        <controls:PivotItem Header="pivot item"
                            Margin="0,0"
                            DataContext="{Binding DCThree}" />
</Grid>

试试这个:

http://www.codeproject.com/Articles/246355/Binding-the-WP7-ProgressIndicator-in-XAML?display=Print

<a:ProgressIndicatorProxy IsVisible="{Binding ElementName=pivot,Path=SelectedItem.DataContext.IsLoading}" />

(还没试过)

本文来自网络,不代表云浮站长网立场。转载请注明出处: https://www.0766zz.com/html/zhonghe/fwq/windows/20200901/9352.html
上一篇
下一篇

作者: dawei

【声明】:云浮站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

返回顶部