Adding GroupStyle HeaderTemplate disables scrollbar in ComboBox

03-16-2021 09:54 AM
New Contributor


I am having an issue where my scrollbar on my ComboBox disappears when I add a HeaderTemplate to my ComboBox. The scrollbar does not show even when the number of items in my ComboBox exceeds the height of the dropdown. When I remove the HeaderTemplate, the scrollbar reappears.

      <GroupStyle HeaderTemplate="{StaticResource LayerHeaderTemplate}"/>


When I change the ScrollViewer's CanContentScroll Property, the scrollbar appears but I lose the ComboBox default style.


   <Style TargetType="{x:Type ComboBox}">
        <Trigger Property="IsGrouping"
          <Setter Property="ScrollViewer.CanContentScroll"


Is there a way to use a HeaderTemplate, maintain ComboBox's default Esri Style, and have the ScrollBar showing?

0 Kudos
2 Replies
by Esri Regular Contributor
Esri Regular Contributor

There is a sample that is using a ListBox with a GroupStyle maybe that can give you some insight.  This sample  displays the scrollbars when needed:


the sample is here: arcgis-pro-sdk-community-samples/Map-Authoring/GeocodingTools at master · Esri/arcgis-pro-sdk-commun...


New Contributor

Hi Wolf,

Thank you for the reply! I looked at the ListBox example and tried the same implementation on my ComboBox for the GroupStyle. The scrollbar still does not appear. I then changed my original code for the  ComboBox and changed ComboBox to a ListBox and left everything else the same. There was a scrollbar and header for the items in my ListBox. If I override the Esri style for ComboBox, I'll get the header and the scrollbar but will not get Esri's style for ComboBox. This is more noticeable in Dark Theme as the background for the dropdown is set to white. I've tested this in Pro 2.2 and 2.6 and have gotten the same result. I was wondering if I am missing anything with ComboBox or would have to style UIElements such as ToggleButton and Popup within ComboBox.





0 Kudos