GroupBox标题文本被截断

Pin*_*ine 8 c# wpf xaml

我正在尝试制作一个GroupBox容纳三个RadioButtons的XAML .一切看起来都很好,除了'g'我的GroupBox标题在底部被切断,像这样:

截图一

我已阅读其他有格式问题的帖子,并且已经避免使用边距定位我的不同元素.但是,这似乎不是我的问题.我已经使用网格构建了所有内容(甚至在我的内部GroupBox),但仍然有些东西正在切断我的标题.任何输入将不胜感激!

当字体是正常而非粗体时,这就是GroupBox的样子:

截图二

以下是我的代码的一部分GroupBox:

<Grid Grid.Row="1">
                <GroupBox Header="Current Units (English)" HorizontalAlignment="Stretch" Name="currentUnitsGroupBox" VerticalAlignment="Stretch" FontSize="12" FontWeight="Bold">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="6" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="4" />
                        </Grid.RowDefinitions>
                        <Grid Grid.Row="1">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width=".22*" />
                                <ColumnDefinition Width=".22*" />
                                <ColumnDefinition Width=".22*" />
                                <ColumnDefinition Width=".36*" />
                            </Grid.ColumnDefinitions>
                            <RadioButton 
                                Content="System" 
                                HorizontalAlignment="Stretch" 
                                Name="systemRadio" 
                                VerticalAlignment="Center" 
                                FontSize="12" 
                                FontWeight="Bold" 
                                IsChecked="True" 
                                Grid.Column ="0" 

                                AutomationProperties.AutomationId="CurrentUnitsSystem"/>
                            <RadioButton 
                                Content="English" 
                                FontSize="12" 
                                FontWeight="Bold" 
                                HorizontalAlignment="Stretch" 
                                Name="englishRadio" 
                                VerticalAlignment="Center" 
                                Grid.Column="1" 

                                AutomationProperties.AutomationId="CurrentUnitsEnglish"/>
                            <RadioButton 
                                Content="Metric" 
                                FontSize="12" 
                                FontWeight="Bold" 
                                HorizontalAlignment="Stretch" 
                                Name="metricRadio" 
                                VerticalAlignment="Center" 
                                Grid.Column="2" 

                                AutomationProperties.AutomationId="CurrentUnitsMetric"/>
                        </Grid>
                    </Grid>
                </GroupBox>
            </Grid>
Run Code Online (Sandbox Code Playgroud)

lok*_*ing 9

我已经用我想到的所有内容进行了测试,但我无法重现它.请尝试以下方法:

<GroupBox FontSize="12" FontWeight="Bold"> 
    <GroupBox.Header> 
           <TextBlock Height="22" Text="Current Units (English)"/>     </GroupBox.Header>
Run Code Online (Sandbox Code Playgroud)

既然the Header GroupBox是一个TextBlock无论如何,我们现在自己做的东西,并调整高度一点点