Bootstrap

WPF 强制刷新TabControl 的Header

<hc:TabControl
    Name="TabControl"
    Grid.Row="0"
    Background="{StaticResource TitleBackground}"
    BorderBrush="#111"
    BorderThickness="0"
    IsScrollable="True"
    ItemsSource="{Binding PageInfoList}"
    SelectedIndex="{Binding ChannelIndex}"
    ShowContextMenu="False"
    TabItemWidth="100">
    <hc:TabControl.ItemTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding Header}" />
        </DataTemplate>
    </hc:TabControl.ItemTemplate>
    <hc:TabControl.ContentTemplate>
        <DataTemplate>
            <ContentPresenter Content="{Binding Content, Mode=OneTime}" />
        </DataTemplate>
    </hc:TabControl.ContentTemplate>
</hc:TabControl>
            ((MainWindow)Window).TabControl.Items.Refresh(); // 强制刷新 TabControl
;