改变 Pivot 的 HeaderTemplate

  <Controls1:Pivot Grid.Row="1"    
                         ItemsSource="{Binding Items}" >  
            <Controls1:Pivot.HeaderTemplate>  
                <DataTemplate>  
                    <Grid>  
                        <TextBlock Margin="0,0,1,0"  
                                   TextWrapping="Wrap"  
                                   Text="{Binding Title}"  
                                   Foreground="{Binding ItemColour}" />  
                    </Grid>  
                </DataTemplate>  
            </Controls1:Pivot.HeaderTemplate>  
        </Controls1:Pivot>  
  

 注:ObservableCollection<T>的缺点

在程序运行的过程中,通过新增、删除或者改变ObservableCollection集合中的数据时,只有新增和删除数据时,UI集合中的数据才改变。 但是在修改集合中已经存在的数据时UI层的数据却不能改变

原文地址:https://www.cnblogs.com/hebeiDGL/p/2474910.html