Steven Kirk
2722f509fa
Swap order of parameters to event args.
As described in #3437 the argument ordering was different to WPF/UWP causing bugs in some code ported from WPF/UWP. Use the same argument ordering as WPF/UWP.
Fixes #3437
6 years ago
Dariusz Komosiński
a238fd33f0
Unify SelectingItemsControl init handling and add extra checks to ensure correctness.
6 years ago
Dariusz Komosinski
7a13d819fd
Optimize and add new efficient visual tree extensions.
6 years ago
Benedikt Schroeder
876ecab433
Fix pre selection
6 years ago
Benedikt Schroeder
e2ff454085
Add failing tests
6 years ago
Benedikt Schroeder
5df55e5c9f
Fix multiselection
6 years ago
Benedikt Schroeder
b20f3f4cdf
Update selected context when selected index changes
6 years ago
Steven Kirk
4f41a70455
Make sure ItemsPresenter is updated before selection change.
Having a separate subscription to `Items.CollectionChanged` in both `ItemsControl` and `ItemsPresenter` meant that the `ItemsPresenter` sometimes doesn't update itself in time for a selection change, resulting in #3148 . Make `ItemsControl` trigger `ItemsPresenter.ItemsChanged` rather than both controls listening to the event separately.
7 years ago
Andrey Kunchev
2e70be023b
fixed #3089 now set selecteditem/s before initialization should work properly
7 years ago
Steven Kirk
400e64dc15
Fix formatting.
7 years ago
Dariusz Komosinski
a2c6bc1b7c
Remove usage of AddClassHandler that returns new lambda per invocation.
7 years ago
Dariusz Komosinski
5814bd7163
Remove direct logging functions.
7 years ago
Steven Kirk
60e3c3c977
Fix selection after initialization.
Fixes first item in menus being selected when menu is shown.
7 years ago
Benedikt Schroeder
b42126b9e3
Properly reset SelectedIndex after the DataContext changed
7 years ago
Benedikt Schroeder
bcbe9c3dbd
Fix setting SelectedIndex in XAML
7 years ago
Dan Walmsley
27e1b9d0f5
check selectedindex instead of _selectedItem
7 years ago
Steven Kirk
25ebbd63be
Allow both SelectedItem and SelectedItems to be bound.
Fixes #2969 .
7 years ago
Dan Walmsley
05b580317c
fix crash scrolling to view when clearing list.
7 years ago
Dan Walmsley
9e6d3db520
fix whitespace.
7 years ago
Dan Walmsley
d636c7647e
only require a single call to ScrollIntoView
7 years ago
Dan Walmsley
e9ae26e09c
fix scrolling to selected item.
7 years ago
Steven Kirk
5de0bf5fec
Fix AlwaysSelected selected state.
Fixes #2901 . Two things needed to be done here:
- When an item is removed, causing indexes to be reassigned, raise `Recycled` so that `SelectingItemsControl` knows to update the selection state
- Update selection state in `SelectingItemsControl` when the selected item changes, but the selected index does not (due to an item being remove)
7 years ago
Steven Kirk
397d972db8
Auto-select first item on `Reset`.
When a reset is received by `SelectingItemsControl` which has `AlwaysSelect == true`, select the first item if present.
Fixes #2754
7 years ago
Steven Kirk
afa38852cf
Fix SelectingItemsControl multiple selection.
- Allow `SelectAll` regardless of `SelectionMode`: `SelectionMode` should only apply to user-interaction
- Don't select multiple on shift/ctrl-right click
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
2b11ca12dd
Don't clear selection on right click.
Fixes #2660 .
7 years ago
Steven Kirk
bf767c2c73
Fix clearing selection when clicking on selected item.
7 years ago
Steven Kirk
8f318ef75b
Make some fields readonly.
7 years ago
Steven Kirk
1066f57c9e
Move SynchronizeItems to TreeView.
As it's no longer used in `SelectingItemsControl`.
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
6926f605f5
Update SelectedIndex when item added before selection.
Fixes #2574 .
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
FoggyFinder
996eda9fb7
set defaultBindingMode as TwoWay for SelectedIndex
7 years ago
Steven Kirk
ba7cec18e3
Handle move in SelectingItemsControl.
Fixes #2522 .
7 years ago
Steven Kirk
e63fc96c84
Fix failing test.
And remove empty method.
7 years ago
Michael Bosschert
de801ed27e
Fixed SynchronizeItems adding duplicate items.
7 years ago
MonkAlex
1c460061cc
#2355 Remove useless xmldoc.
7 years ago
MonkAlex
e38e49e7d0
#2355 'Select all' for SelectingItemsControl with platform hotkey configuration.
7 years ago
MonkAlex
e3d7d47753
#2355 Ctrl+A hotkey for SelectingItemsControl
7 years ago
Dariusz Komosinski
c9d8fa6a9d
Move SynchronizeItems about private methods.
7 years ago
José Pedro
96d84c942d
Use Array.Empty instead of allocating empty arrays.
7 years ago
Dariusz Komosinski
85d309830a
TreeView multiple selection support.
7 years ago
Andrey Kunchev
daadd9c674
support member selector when recycling Dropdown/listboxitems
7 years ago
Andrey Kunchev
889156df43
fixes #1971 listbox toggle selection
8 years ago
Steven Kirk
d0b77ecca1
Update before calling base.EndInit.
Fixes #1932 .
8 years ago
wojciech krysiak
57058f19cd
Fix SelectedItemsChanged event arguments in SelectingItemsControl
8 years ago
Miha Markič
1524cb1aba
Spellchecks comments and members, removes unused using statements and sorts them
8 years ago