私のアプリケーション内で、私は最近、その外観の点でそれをジャズしようとしたので、使用してみMahApps.Metroました. しかし、私はちょっとした障害にぶつかりました。
私のアプリケーション内には、次のようtabcontrolに a があり、 a を使用しstyleました。
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!--Resource dictionary for mahapps. -->
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type TabItem}">
<Setter Property="HeaderTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<!-- FormName is the name of the ViewModel-->
<TextBlock Text="{Binding FormName}" VerticalAlignment="Center" Margin="2" />
</StackPanel>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsValid}"
Value="False">
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Page.Resources>
<!-- The itemsource that is bound to is a ObservableCollection of Forms that are used to validate for a Progress bar, It uses the ViewModels-->
<TabControl x:Name="tabcontrol"
Grid.Row="1"
ItemsSource="{Binding Forms}"
SelectedIndex="0" BorderBrush="Black" />
明らかに、これは を使用していませんMahApps.Metro tabcontrol。ただし、 内でstyleを次のようtabcontrolに変更しTargetTypeましたが、 内のすべてのPageサイズが大きくなり、2 つのタブ コンテンツが効果的に 1 つに結合されます。
<Style TargetType="{x:Type Controls:MetroTabItem}" BasedOn="{StaticResource MetroTabItem}">

私が間違っていることを実装し、解決するのを手伝ってくれることに関して、どんな助けにも感謝しMahApps.Meto tab controlます。乾杯。