我有一个带有Pivot和3个PivotItems的应用程序。每个PivotItem都有自己的DataContext,并且DataContext具有名为IsLoading的属性。
可以将SystemTray.ProgressIndicator IsVisible属性绑定到选定的PivotItem 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,28,24,0"
DataContext="{Binding DCTwo}" />
<controls:PivotItem Header="pivot item"
Margin="0,28,24,0"
DataContext="{Binding DCThree}" />
</Grid>