没有dragablz的XAML Material Design TabControl

时间:2017-01-13 09:45:27

标签: xaml material-design tabcontrol

嘿,我在哪里可以找到没有dragablz的Material Design TabControl示例?所有样品都带有可拖拽......如下图所示。

enter image description here

3 个答案:

答案 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