Steven Kirk
8bfe6b9645
Support heterogeneous item containers.
3 years ago
Max Katz
4aa6035ec3
Reuse text and geometry related headless mocks in Avalonia unit tests and benchmarks
3 years ago
Steven Kirk
5391361d45
Failing test for selection w/ virtualization.
3 years ago
Steven Kirk
2c9f286db0
Added failing tests for #11119 .
3 years ago
Steven Kirk
e3bf19a399
Update tests due to changes in #10803 .
3 years ago
Steven Kirk
2aca946a71
Respect single-select with IsSelected bindings.
Use the existing `UpdateSelection` methods to correctly respect the current `SelectionMode`.
3 years ago
Steven Kirk
191a835c6a
Make container IsSelected bindings work again.
Rather than using the `ISelectable` interface to communicate container selection from the `SelectingItemsControl` to the container, use the `SelectingItemsControl.IsSelected` attached property, setting it with `SetCurrentValue` so that bindings defined in a style or item container theme can override the selection. Required an extra virtual `ContainerForItemPreparedOverride` method on `ItemsControl`.
3 years ago
Steven Kirk
e609822311
Modernized some SelectingItemsControl tests.
And moved some of the tests that were specific to user interaction to `ListBoxTests` as `SelectingItemsControl` doesn't define user interactions.
3 years ago
Steven Kirk
f8eceb4af9
Update usages of ItemsControl Items/ItemsSource.
- Use `ItemsSource` when appropriate
- When `Items` is appropriate, don't use the setter
3 years ago
Emmanuel Hansen
f61c7f6cd9
Revert "fix tests"
This reverts commit 584e18f78d29480890711b1149d946f61e0d8447.
3 years ago
Emmanuel Hansen
c804fa00cf
fix tests
3 years ago
Steven Kirk
c1ee26c05a
Fixed SelectingItemsControlTests.
`ListBox` now needs a root as it uses a `VirtualizingStackPanel`.
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`.
3 years ago
Giuseppe Lippolis
de4b55f8ee
feat(tests): Address rule CA1822
3 years ago
Takoooooo
fe79cee672
Fix Tests.
4 years ago
Steven Kirk
9c8376348c
Make remaining tests pass.
6 years ago
Steven Kirk
bfbf58dfd0
Adjust expected output.
6 years ago
Steven Kirk
55cbf4a8df
Unskip tests we can handle now.
6 years ago
Steven Kirk
0e7f24ff51
Added back removed tests.
6 years ago
Steven Kirk
4c20313b12
Adjust a few expected test results.
6 years ago
Steven Kirk
a9b04a5c2c
Started integrating new SelectionModel.
6 years ago
Steven Kirk
95f9a98843
Fixed/skipped failing tests.
6 years ago
Steven Kirk
af90219ff4
Reverted SelectionModel.
6 years ago
Steven Kirk
41831066c2
Revert "Fix selection after deleting an item."
6 years ago
Steven Kirk
6555a51f5a
Fix selection after deleting an item.
`SelectionModel` needs to subscribe to `CollectionChanged` on the items before `ItemsControl` in order for the selection to be correct when we come to setting the selected state.
Because `SelectionModel.Source` isn't subscribed during initialization in `ItemsChanged`, we also need to make sure we don't subscribe `ItemsControl` to the collection changes during initialization. Instead subscribe in `OnInitialized` (this requires a few tests to be rooted in order to be called).
Fixes #4293
6 years ago
Steven Kirk
bc079008d1
Remove usage of deprecated input APIs.
6 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
Steven Kirk
6001115573
Use SelectionModel in SelectingItemsControl.
6 years ago
Dariusz Komosinski
41ab586d46
Fix unit tests.
6 years ago
Dariusz Komosinski
85f205a94f
Failing unit tests for SelectingItemsControl events
6 years ago
Benedikt Schroeder
5df55e5c9f
Fix multiselection
6 years ago
Steven Kirk
41e9999ae7
Move MouseTestHelper to Avalonia.UnitTests.
7 years ago
Steven Kirk
cae46af287
Fixed typos.
7 years ago
Steven Kirk
0b88151b65
Fix tests failing after merge.
7 years ago
Nikita Tsukanov
1ab923c02e
Removed WithNameScope
7 years ago
Nikita Tsukanov
fa55755b71
Manually handle name scope registrations
7 years ago
Steven Kirk
f8741ead2c
Added failing SelectingItemsControl tests.
7 years ago
Steven Kirk
fc9a8db010
Correctly select materialized containers.
And add another test.
7 years ago
Steven Kirk
11a3f0c093
Added failing test for #2565 .
Along with a passing test I wrote looking for the solution, and some documentation about SelectionMode.
7 years ago
Steven Kirk
ccf60266e8
Send clicks rather than mouse down messages.
7 years ago
Steven Kirk
f84f6068bc
Added failing tests for #2660 .
7 years ago
Steven Kirk
bf767c2c73
Fix clearing selection when clicking on selected item.
7 years ago
Steven Kirk
94d71fb12f
More work on updating selection...
...when source items change.
7 years ago
Steven Kirk
ca23d03f98
Update SelectedIndex when items removed before selection.
7 years ago
Steven Kirk
1c85f409b3
Set SelectedIndex/Item on (Un)SelectAll().
7 years ago
Steven Kirk
2e9fbe238b
Refactor selection in SelectingItemsControl.
Instead of using `SelectedItems` as the canonical source of selection information, use an internal `Selection` class which keeps track of the selection in terms of item indexes.
Fixes #2004
7 years ago
wojciech krysiak
57058f19cd
Fix SelectedItemsChanged event arguments in SelectingItemsControl
7 years ago
Jeremy Koritzinsky
cf8244b37a
Move current contents of Avalonia.Markup to Avalonia.Base. Move Avalonia.Markup.Xaml.Data/Parser classes to Avalonia.Markup since they're not Xaml-specific.
Use pattern-matching switch.
Fix bug from cleanup.
8 years ago
José Pedro
cc7098583e
Fixed Assert.Null warnings.
8 years ago