I have a combo box which is filled with checkbox items.
When I scroll down I would like to have the first item of the combo box to always be visible.
It should kind of look like the the navigation bar on this or other websites.
Thanks in advance.
I have a combo box which is filled with checkbox items.
When I scroll down I would like to have the first item of the combo box to always be visible.
It should kind of look like the the navigation bar on this or other websites.
Thanks in advance.
You can modify control template, see this post how to extract it.
Below is ugly (but working) solution to see current selected item on top of popup, which you can modify to your liking:
For this you have to extract combobox control template as mentioned before, then search for
<Popup x:Name="PART_Popup"
and modify its
<Border x:Name="DropDownBorder"
by adding inside a Grid
like this:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<ContentControl Content="{TemplateBinding SelectionBoxItem}" />
Now just set grid row for ealier existing scroll viewer:
<ScrollViewer x:Name="DropDownScrollViewer" Grid.Row="1">
don't forget to close Grid attribute after it:
</Grid>