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,但为什么第一次的工作作风? '