2013-03-13 40 views
0

這裏的測試窗口的XAML:簡單MahApps.Metro應用不定型的GroupBox

<controls:MetroWindow x:Class="MahGroupBoxTest.MainWindow" 
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
      xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" 
      Title="MainWindow" Height="350" Width="525"> 
    <controls:MetroWindow.Resources> 
     <ResourceDictionary> 
      <ResourceDictionary.MergedDictionaries> 
       <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" /> 
       <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" /> 
       <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" /> 
       <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" /> 
       <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" /> 
      </ResourceDictionary.MergedDictionaries> 
     </ResourceDictionary>   
    </controls:MetroWindow.Resources> 
    <Grid> 
     <GroupBox Header="Test GroupBox" ></GroupBox> 
    </Grid> 
</controls:MetroWindow> 

而這裏的結果:

enter image description here

我期望的風格GroupBox像演示。我已經看過這個項目中的問題,以前似乎沒有人遇到過這個問題。所以我認爲這個問題可能與我有關。有任何想法嗎?

我使用.Net 4.0構建項目,MahApps版本爲0.10.0.1。

回答