Steven Kirk
0065a962ac
Move ItemsRepeater to separate assembly.
3 years ago
Dmitry Zhelnin
65d8e46fa6
VirtualizingStackPanel: fix selection wrapping
3 years ago
Emmanuel Hansen
feddc7e1c4
make AreVerticalSnapPointsRegular and AreHorizontalSnapPointsRegular styled properties
3 years ago
Emmanuel Hansen
51e9f8b611
add irregular snap points to virtualizing stack panel
3 years ago
Emmanuel Hansen
e6c60ddfef
add regular snap points to virutalizing panel
3 years ago
Steven Kirk
d0f479d80c
Don't recycle focused element.
Fixes #9269
3 years ago
Steven Kirk
8600f306e0
Add redundancy for a problem I can't repro in tests.
There's a problem with `DataBox` that I can't repro in a unit test. Add some redundancy such that if we're still waiting for a viewport update after carrying out a layout pass, force another layout.
3 years ago
Steven Kirk
1ef4df181b
Fix nits.
3 years ago
Steven Kirk
0dcf836a90
Remove debug code.
3 years ago
Steven Kirk
039fb905ad
Handle item move and replace.
3 years ago
Steven Kirk
c55b7a9000
Correctly handle control items being removed.
3 years ago
Steven Kirk
9610c80bd3
Remove references to "model index".
It's a TreeDataGrid concept (which is where this code was adapted from).
3 years ago
Steven Kirk
d5a585d722
Tweaked VirtualizingPanel API.
And added some more doc comments.
3 years ago
Steven Kirk
6d267f9d20
Add scroll anchoring support to ItemsControl.
This necessitated adding another stage to the container preparation lifecycle that will be called after the container is added to the logical and visual trees: `ItemContainerPrepared`. Such a method is going to be necessary anyway if we ever want to expose events for container realization so will probably be worth having regardless.
3 years ago
Steven Kirk
14df77a897
Improve support for variable-sized items.
3 years ago
Steven Kirk
d4a8b98b37
Invalidate measure less.
Only invalidate the measure when the viewport changes in the direction of scroll.
3 years ago
Steven Kirk
3195df0910
Use ItemsSourceView in ItemsControl.
Fixes #54 .
3 years ago
Steven Kirk
08f90dcad6
Make logic a bit clearer.
3 years ago
Steven Kirk
2ae5c9c0fe
Reimplement IChildIndexProvider.
3 years ago
Steven Kirk
2c4572a98e
Attach to panel before preparing container.
3 years ago
Steven Kirk
a9ca852300
Notify ItemsControl when container index changes.
3 years ago
Steven Kirk
14d429ec4e
Added ItemsControl.GetRealizedContainers().
3 years ago
Steven Kirk
a1d809b49d
Fix VirtualizingStackPanel navigation logic.
3 years ago
Steven Kirk
57b1ba965c
Implement INavigableContainer.
3 years ago
Steven Kirk
1101f28dd7
Refactored ItemContainerGenerator.
A bunch of tests still failing, and some code commented out, but outlines the new API shape.
3 years ago
Steven Kirk
5d1f9f4a0f
Removed VirtualizationMode.
If you want a different virtualization mode, use a different panel.
3 years ago
Steven Kirk
c20e3c29e6
Initial (re)impl of VirtualizingStackPanel.
Currently only supports smooth scrolling.
3 years ago
Steven Kirk
692c0c155d
Begin refactoring ItemsPresenter.
A lot still broken, in particular virtualization is completely removed.`ItemsPresenter` now no longer has an `Items` or `ItemTemplate` property; it detects when it's hosted in an `ItemsControl`. `IItemsPresenter` interface removed.
3 years ago
Steven Kirk
ec74057151
Removed a number of interfaces.
`IAvaloniaObject`, `IControl`, `ILayoutable`, `IPanel`, `IStyledElement`, `IVisual`.
4 years ago
Takoooooo
0d896b3847
Improove nullable annotations.
4 years ago
Dominik Matijaca
b040ac5414
ItemsControl: WrapSelection ( #6286 )
Add support for selection wrapping for ListBox, ItemsControl, ComboBox.
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
Co-authored-by: Takoooooo <tako0qq@gmail.com>
Co-authored-by: Steven Kirk <grokys@gmail.com>
4 years ago
Steven Kirk
77d059be22
Add nullable annotations to Avalonia.Controls.
4 years ago
Steven Kirk
4d01dacd77
Remove copyright headers.
Some of our files had them, some didn't. They serve no purpose legally so best to remove the ceremony.
6 years ago
Dan Walmsley
5062f823b3
rename stackpanel Gap property to Spacing property.
8 years ago
Steven Kirk
8a80a724d7
Implement disabling of ListBox scrollbars.
Fixes #1344 .
8 years ago
Goldy
d4a32764ca
Add null check for parameter
Remove unused variable
9 years ago
Steven Kirk
240bc4d2ca
Fix horizontal scroll with virtualized items.
Fixes #849
9 years ago
Steven Kirk
55d76d6cb9
Make sure panel is remeasured after add/remove.
After items are added or removed then the virtualizing panel must be
remeasured. It's usually not remeasured if the available size is the
same as on the last measure as that causes an infinite loop; this adds a
`ForceInvalidateMeasure` to `IVirtualizingPanel` which will force a
remeasure even if the available size hasn't changed. Also adds tests for
the behavior.
10 years ago
Steven Kirk
f6e288f72a
Update available space in arrange.
This fixes #709 but breaks the
Should_Add_Containers_For_Items_After_Clear. Fix for that incoming.
10 years ago
Steven Kirk
47beb2725c
Don't reset available space on Arrange.
This fixes the failing `Should_Add_Containers_For_Items_After_Clear`
however I'm unsure if it's the correct fix. May need to revisit if it
seems to be causing other problems.
10 years ago
Steven Kirk
d581bfe69e
Limit initial measure of virtualized list.
Prevents all items being materialized when virtualized control is
measured with infinity.
10 years ago
Steven Kirk
d0942f84a9
FocusNavigationDirection => NavigationDirection
And added page up/down.
10 years ago
Steven Kirk
7e4f667d89
Fix PixelOverflow during arrange.
10 years ago
Steven Kirk
7a718ef9c2
Updated overflow algorithm.
10 years ago
Steven Kirk
acdf599dec
Initial impl. of scrolling with arrow keys.
- Currently only vertical implemented
- Doesn't handle partially visible items at end of list
10 years ago
Steven Kirk
f660da41c7
Fix virtualized list to taking up available space.
Previous commit was slightly wrong: too many controls were being created
for the list in VirtualizingTest.
10 years ago
Steven Kirk
71b3343097
Allow virtualized list to take up available space.
10 years ago
Steven Kirk
7f09154020
Correctly handle partially obscured items.
And move logical for selecting horizontal/vertical components of
extent/offset/viewport into `ItemVirtualizer` base class.
10 years ago
Steven Kirk
91e2f2a0ca
Refactored virtualization handling into classes
Also take into account the scroll direction of the panel.
10 years ago
Steven Kirk
38afaf1aca
More WIP on adding virtualization to ItemsPresenter.
10 years ago