2011-10-11 17 views
5

私はPivotと3 PivotItemを持つアプリケーションを持っています。各PivotItemには独自のDataContextがあり、DataContextにはIsLoadingという名前のプロパティがあります。SystemTrayプログレスバーを選択したPivotItem DataContextのプロパティにバインドする方法

SystemTray.ProgressIndicator IsVisibleプロパティを、選択したピボットアイテムのDataContext.IsLoadingプロパティにバインドすることはできますか?ここで

は、私がtryiedどのようなものです:

<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> 

答えて

関連する問題