Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove grouping from ComboBox and make GalleryPanel inherit from StackPanel #309

Closed
batzen opened this issue Apr 23, 2016 · 0 comments
Closed
Assignees
Milestone

Comments

@batzen
Copy link
Member

batzen commented Apr 23, 2016

Grouping in ComboBox is broken for roughly a year now, after i changed the GalleryPanel's inheritance from Panel to VirtualizingStackPanel to fix #142 with commit c6ccc78.
It's also noted in #305 the there are massive problems with the ComboBox currently.
Because no one seems to have noticed/missed it I will remove the grouping feature from the ComboBox entirely and switch GalleryPanel back to inherit from StackPanel instead of VirtualizingStackPanel.

Switching to VirtualizingStackPanel in GalleryPanel back then was a bad idea as the GalleryPanel introduces it's own items when rendering which causes a lot of problems when using a VirtualizingStackPanel as a base class.

By removing the grouping from ComboBox i can also completely remove the dependency on GalleryPanel from the ComboBox any rely on the standard ItemsPresenter.
This also allows for changing the ItemsPanel of ComboBox thus making virtualized/non virtualized ComboBox possible.

It's still possible to use GalleryPanel as the ItemsPanel for the ComboBox. To make it work you just have to:
On the ComboBox:

ScrollViewer.CanContentScroll="False"

As itemspanel:

<Fluent:ComboBox.ItemsPanel>
    <ItemsPanelTemplate>
        <Fluent:GalleryPanel GroupBy="Tag"
                                ItemContainerGenerator="{Binding ItemContainerGenerator, RelativeSource={RelativeSource FindAncestor, AncestorType=ComboBox}}" />
    </ItemsPanelTemplate>
</Fluent:ComboBox.ItemsPanel>

@GeertvanHorrik @robdg80 you might be interested in this breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant