-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[1.7] Tab indicators in the cmdpal aren't working (sometimes?) #9288
Comments
I hope to get back to work on Terminal - I am missing all the action |
So it appears that ListView (_filteredActionViews) recycles ListViewItems. 🤦 To reproduce the problem simply:
No zoom icon will be shown. Still considering how to fix this. |
HUH. I would have expected ListViewItems to be recycled only based on data template (!!!) so this is sorta scary. |
Ah. "Container-recycling with heterogeneous collections"
|
According to the documentation it does:
|
The issues seems to be somehow related to virtualization. Though looking at After debugging
@DHowett - I tried disabling virtualization (by overriding the stack panel with VirtualizingStackPanel in VirtualizationMode="Standard"). It solved the problem (but for some reason screwed a horizontal alignment a bit - I guess it is fixable). WDYT? |
There seems to be a bug in WinUI (see microsoft/microsoft-ui-xaml#2121) that results in heterogeneous `ModernCollectionBasePanel` configured with `DataTemplateSelector` and virtualization enabled to recycle a container even if its `ContentTemplate` is wrong. I considered few options of handling this: * Disabling virtualization (by replacing item container template with some non-virtualizing panel (e.g., `StackPanel`, `VirtualizingStackPanel` with `VirtualizationMode`=`Standard`) * Replacing `DataTemplateSelector` approach with `ChoosingItemContainer` event handling approach, which allows you to manage the item container (`ListViewItem`) allocation process. I have chosen the last one, as it should limit the amount of allocations, and might allow optimizations in the future. The solution introduces: * A container for `ListViewItem`s in the form of a map of sets: * The key of this map is a data template (e.g., `TabItemDataTemplate`) * The value in the set is the container * `ChoosingItemContainer` event handler that looks for available item in the container or creates a new one * `ContainerContentChanging` event handler that returns the recycled item to the container Closes #9288 (cherry picked from commit e02d9a4)
🎉This issue was addressed in #9487, which has now been successfully released as Handy links: |
🎉This issue was addressed in #9487, which has now been successfully released as Handy links: |
Surprise surprise! we ran into an old friend: * #9288 * #9487 * microsoft/microsoft-ui-xaml#2121 so uh, this is ded.
Build is 1.7.552.0.
wt ; nt
You should see a lock:
But sometimes you don't?
When I was first debugging through this, it looked like
PaletteItemTemplateSelector::_TabItemTemplate
was null. However when debugging the release build that doesn't repro this,_TabItemTemplate
definitely isn't null, so that can't be it.The text was updated successfully, but these errors were encountered: