Как привязать SystemTray Progressbar к свойству в выбранном PivotItem DataContext

У меня есть приложение с Pivot и 3 PivotItems. Каждый PivotItem имеет свой собственный DataContext, а DataContext имеет свойство с именем IsLoading.

Можно привязать свойство IsVisible SystemTray.ProgressIndicator к выбранному свойству 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,28,24,0"
                            DataContext="{Binding DCTwo}" />

        <controls:PivotItem Header="pivot item"
                            Margin="0,28,24,0"
                            DataContext="{Binding DCThree}" />
</Grid>
5
задан Marcelo de Aguiar 11 October 2011 в 19:35
поделиться