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
Steven Kirk
5be41985c3
Renamed Perspex -> Avalonia
10 years ago
Steven Kirk
d1fcb2f5a6
Fixed failing tests.
10 years ago
Steven Kirk
1841e7ad7a
Start allowing Setters to contain bindings.
This is needed so that things like the following can be done:
<TreeView>
<TreeView.Styles>
<Style Selector="TreeViewItem">
<Setter Property="IsExpanded" Value="{Binding IsExpanded}"/>
</Style>
</TreeView.Styles>
<TreeView>
(At the moment we have TreeDataTemplate.IsExpanded but this isn't good
enough: it only supports setting IsExpanded on creation of the item with
no binding.)
With this commit, setters can now contain bindings, but they aren't yet
applied correctly. As part of this commit, classes related to binding
have been moved to the Perspex.Data namespace.
10 years ago
Steven Kirk
c49201b8cb
Added SelectingItemsControl.SelectionChanged event.
10 years ago
Steven Kirk
c810f95904
Don't ApplyTemplate on nested templated controls...
...during ApplyTemplate. This was so that ItemsControls could their find
ItemsPresenters nested in other templated controls. Instead use
IItemsPresenterHost to make the presenter register itself with its
TemplatedParent.
10 years ago
Steven Kirk
626aa9cd19
Fix SelectingItemsControl.SelectedItems bug.
Make sure unbound SelectedItems cleared when DataContext is cleared.
10 years ago
Steven Kirk
1044154279
Bind to other controls with #control syntax.
Rather than specifying ElementName separately, allow binding using a "#control.Property" property path.
10 years ago
Steven Kirk
71cd3d965b
More work on XAML control theme.
10 years ago
Steven Kirk
b230c3b3f3
Renamed XamlBinding -> Binding
Had to also rename enclosing namespace from Binding to Data as classes
with same name as a namespace cause problems.
10 years ago
Steven Kirk
785238bdf1
Merged XamlBinding and XamlTemplateBinding.
10 years ago
Steven Kirk
01417ba883
Renamed ControlTemplate -> FuncControlTemplate
10 years ago
Steven Kirk
5b307f653d
Fix spurious selection changes.
In SelectingItemsControl. This was causing TabControls with transitions
to break.
10 years ago
Steven Kirk
e824458a00
Fix DataContext binding problem with SelectedItems.
This one has to be solved in SelectingItemsControl as the property is
not updated via a binding.
10 years ago
Steven Kirk
6401cec2ef
Make SelectedItems a plain IList
As IList<T> is not covariant.
10 years ago