2
Vote

RibbonComboBox does not display a scroll bar when appropriate

description

when the itemspresenter exceeds the size of the popup, a scrollbar is not displayed. also, the footer content is no longer visible. the template contains a stackpanel, which does not constrain itself to the size of the popup. using a DockPanel fixes the issue:
 
<DockPanel>
<ContentControl Content="{TemplateBinding DropDownHeader}" ContentTemplate="{TemplateBinding DropDownHeaderTemplate}" DockPanel.Dock="Top" />
<ContentControl Content="{TemplateBinding DropDownFooter}" ContentTemplate="{TemplateBinding DropDownFooterTemplate}" DockPanel.Dock="Bottom" />
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" CanContentScroll="True">
    <ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
            KeyboardNavigation.DirectionalNavigation="Contained" Margin="1" />
</ScrollViewer>
</DockPanel>

comments