<ribbon:Ribbon>
<ribbon:Ribbon.Tabs>
<ribbon:Tab Label="Tab">
<ribbon:Group Label="Group">
<ribbon:StackPanel>
<ribbon:ComboBox Label="Combo">
<ribbon:ComboBox.Resources>
<Thickness x:Key="{x:Static themes:AssetResourceKeys.ListItemInnerBorderNormalThicknessKey}">1,0,1,0</Thickness>
<Thickness x:Key="{x:Static themes:AssetResourceKeys.ListItemBorderNormalThicknessKey}">1,0,1,0</Thickness>
<SolidColorBrush x:Key="{x:Static themes:AssetResourceKeys.MenuItemIconColumnBackgroundNormalBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static themes:AssetResourceKeys.MenuItemIconColumnBorderNormalBrushKey}" Color="Black" />
<Style TargetType="{x:Type Separator}">
<Setter Property="Margin">
<Setter.Value>
<Thickness Left="{x:Static ribbon:RibbonMeasurements.MenuItemSmallIconColumnWidth}" Top="-1" Right="0" Bottom="-1" />
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type ribbon:Button}" BasedOn="{StaticResource {x:Type ribbon:Button}}">
<Setter Property="Context" Value="MenuItem" />
<Setter Property="IsHitTestVisible" Value="False" />
<Setter Property="Margin" Value="0" />
</Style>
</ribbon:ComboBox.Resources>
<ribbon:ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource {x:Static themes:SharedResourceKeys.ComboBoxItemStyleKey}}">
<Setter Property="Margin" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
</ribbon:ComboBox.ItemContainerStyle>
<ribbon:Button Label="Item 1" />
<ribbon:Button Label="Item 2" />
<ribbon:Button Label="Item 3" />
<ribbon:Separator Context="MenuItem" />
<ribbon:Button Label="Item 4" />
</ribbon:ComboBox>
</ribbon:StackPanel>
</ribbon:Group>
</ribbon:Tab>
</ribbon:Ribbon.Tabs>
</ribbon:Ribbon>
With a standard WPF Separator (<Separator/>) the above functions as I intend; a non-selectable line is drawn in place of an item, but it spans the width of the drop down. I'd like to use the Actipro separator mostly to get my margins correct in adjusting for the image. However, as your control is not covered by the default IsItemItsOwnContainer (and by extension, GetContainerForItemOverride), the Actipro separator is selectable and I have to set an arbitrary Margin (29,-1,0,-1) to push the separator into the position it should be in. I know that {x:Static ribbon:RibbonMeasurements.MenuItemSmallIconColumnWidth} (26) works (change the ribbon:Separator to Separator above to see it) as the left value but that pushes the line right against the vertical image borders instead of providing the appropriate buffer. Any chance this can be dealt with in a maintenance release?
[Modified 11 years ago]