答案 0 :(得分:2)
@fruggiero表示MaterialDesignInXamlToolkit的tabcontrol没有任何样式...但是在这里,您可以通过所需的外观实现相同的tabcontrol之类的功能,
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<materialDesign:ColorZone Mode="PrimaryMid">
<StackPanel Orientation="Horizontal" Margin="2">
<RadioButton Style="{StaticResource MaterialDesignTabRadioButton}" x:Name="rbTab1" Margin="4" IsChecked="True" Content="TAB 1"/>
<RadioButton Style="{StaticResource MaterialDesignTabRadioButton}" x:Name="rbTab2" Margin="4" Content="TAB 2"/>
<RadioButton Style="{StaticResource MaterialDesignTabRadioButton}" x:Name="rbTab3" Margin="4" Content="TAB 3"/>
</StackPanel>
</materialDesign:ColorZone>
<Border Grid.Row="1" BorderThickness="1 0 1 1" BorderBrush="{DynamicResource PrimaryHueMidBrush}" Padding="16">
<Grid>
<Grid Visibility="{Binding IsChecked, ElementName=rbTab1, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock Text="This is tab page 1 content" FontSize="16" FontWeight="Medium"/>
</Grid>
<Grid Visibility="{Binding IsChecked, ElementName=rbTab2, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock Text="This is tab page 2 content" FontSize="16" FontWeight="Medium"/>
</Grid>
<Grid Visibility="{Binding IsChecked, ElementName=rbTab3, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock Text="This is tab page 3 content" FontSize="16" FontWeight="Medium"/>
</Grid>
</Grid>
</Border>
</Grid>
答案 1 :(得分:0)
MaterialDesignInXamlToolkit 实际上不会为tabcontrol提供样式。
因此,您只能使用dragablz tabcontrol并根据需要对其进行配置。
答案 2 :(得分:0)
您可以使用MaterialDesignExtensions随附的 MaterialDesignTabControl 。