加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

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

发布时间:2020-12-13 21:29:46 所属栏目:Windows 来源:网络整理
导读:我有一个带有Pivot和3个PivotItems的应用程序.每个PivotItem都有自己的DataContext,DataContext有一个名为IsLoading的属性. 可以将SystemTray.ProgressIndicator IsVisible属性绑定到选定的pivotitem DataContext.IsLoading属性? 这是我尝试过的: shell:Sy
我有一个带有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}" />

(还没试过)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读