1
我有一個像WPF:樣式不適用
<ribbon:RibbonGallery>
<ribbon:RibbonGallery.Resources>
<Style TargetType="ribbon:RibbonGalleryItem">
<Setter Property="Width" Value="24" />
<Setter Property="Padding" Value="0" />
</Style>
<Style TargetType="Rectangle">
<Setter Property="Width" Value="16" />
<Setter Property="Height" Value="16" />
</Style>
</ribbon:RibbonGallery.Resources>
</ribbon:RibbonGalleryCategory>
<ribbon:RibbonGalleryCategory x:Name="themeColors" Header="Theme Colors" MinColumnCount="10" MaxColumnCount="10">
<ribbon:RibbonGalleryCategory.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" >
<Rectangle Fill="{Binding}" />
</StackPanel>
</DataTemplate>
</ribbon:RibbonGalleryCategory.ItemTemplate>
</ribbon:RibbonGalleryCategory>
</ribbon:RibbonGallery>
我的寬度和高度的設置不會應用到矩形。我想知道什麼是錯
OOO,但爲什麼第一次的工作作風? '