Dariusz Komosinski
7a13d819fd
Optimize and add new efficient visual tree extensions.
7 years ago
Steven Kirk
68b655b517
Add to logical children before notifying presenter.
This makes sure that newly added control items have the correct logical parent.
7 years ago
Steven Kirk
496fae20e5
Ensure Items are synchronised with Presenter.
Ensure that the `ItemsControl`'s presenter is notified of an `Items` change at the appropriate time.
7 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
Steven Kirk
adb65f14b1
Don't use C#8 features yet.
7 years ago
Steven Kirk
60c9015a7f
Prevent hang in ItemsControl with no focusable controls.
7 years ago
Dariusz Komosinski
a2c6bc1b7c
Remove usage of AddClassHandler that returns new lambda per invocation.
7 years ago
Steven Kirk
cce605af49
Remove unused/bad code.
Removed the code that was causing the TreeView problems described in #2944 . This code was never actually called except in `TreeView` because a plain `ItemsControl` can't be used with virtualization (it uses untyped `ItemContainerGenerator` so items can't be recycled) and every other derived class derives from SelectingItemsControl which overrides this method and doesn't call the base implementation. In addition there were no unit tests covering this code.
Fixes #2944
7 years ago
Steven Kirk
2fa8247f01
Removed MemberSelector.
7 years ago
Steven Kirk
336086a588
Make ItemCount a direct property.
Fixes #2658
7 years ago
Dariusz Komosinski
71cee6ae5b
Fix ItemTemplateProperty being subscribed to on every ItemsControl or derived class construction.
8 years ago
Steven Kirk
e5cac827b1
Make TemplatedParent a direct property.
During initial layout, `TemplatedParent` is read tens of thousands of times. This being a styled property that used `inherits: true` meant that it was showing up in profiling as taking up a significant amount of time.
Make `TemplatedParent` a direct property so that reading it is a simple property access. This doesn't actually complicate the code much at all as once set the property value doesn't change, so `inherited: true` semantics are not that important.
8 years ago
Miha Markič
1524cb1aba
Spellchecks comments and members, removes unused using statements and sorts them
8 years ago
Steven Kirk
1293e9af8d
Implemented Menu interactions.
8 years ago
Steven Kirk
1e12b2c37b
Don't focus non-focusable controls.
When navigating `ItemsControl` with keyboard.
8 years ago
Steven Kirk
9e2e266d3c
Handle navigation in TreeView.
8 years ago
Steven Kirk
10c2ec64ad
Implement directional navigation in ItemsControl.
8 years ago
Steven Kirk
cf14976dcc
Fix #1709 .
8 years ago
Unknown
4479734961
remove added whitespace.
8 years ago
Unknown
0f7ab7e61f
add singleitem psuedo class on items control.
8 years ago
sdoroff
6103bab860
Altered ItemsControl to use Weak CollectionChange Subscription
9 years ago
Jurjen Biewenga
4f13d50496
Added initial changes to allow the user to change the selected item while the dropdown is closed but selected and allows the user to open the dropdown by pressing down
9 years ago
Nikita Tsukanov
0b756d0b8a
More null checks
9 years ago
Dan Walmsley
d3e66eac58
Fix null check around adding Container.Child to logical children.
10 years ago
Dan Walmsley
0b3db9af23
Remove allocation of list that is not neccesary
10 years ago
Dan Walmsley
67a99dc09a
No longer type checking as not necessary.
10 years ago
Dan Walmsley
225148fd04
Removed unused using.
10 years ago
Dan Walmsley
2004bdb329
more whitespace changes.
10 years ago
Dan Walmsley
525d1369a5
Removed casting that was not needed.
10 years ago
Dan Walmsley
28ddbb2159
Removed whitespace.
10 years ago
Dan Walmsley
8a3acecf25
Removed comments
10 years ago
Dan Walmsley
bcc6cc196c
Set TemplatedParentProperty null before calling update child
so it doesnt end up seting the ItemsControls parent as the container.childs parent.
Preventing it being removed from logical tree.
10 years ago
Dan Walmsley
d398766c57
remove excessive null check, is also serves for null check.
10 years ago
Dan Walmsley
dac0da2cac
Corrected logic for materialize methods.
10 years ago
Dan Walmsley
59fd92dcfb
Null check in ItemsControl on Materialized and Dematerialized, to prevent
exceptions being thrown, trying to do is check on null.
10 years ago
Dan Walmsley
03afec5596
fix bug checking wrong property for is ILogical
10 years ago
Dan Walmsley
3af1cff1ca
Fix ItemsControl preventing DataTemplates getting applied.
10 years ago
Dan Walmsley
59d499fee4
ItemsControl ensure Containers Templated parent is null.
10 years ago
Dan Walmsley
5a43816db5
whitespace
10 years ago
Dan Walmsley
cf13ae3425
removed excessive casting.
10 years ago
Dan Walmsley
261b63dd4c
fix whitespace
10 years ago
Dan Walmsley
ba89e646c4
ItemsControl uses the ContainerType property to check if its a typed container.
10 years ago
Dan Walmsley
c5c09275b5
Items control removes the logical child correctly.
10 years ago
Dan Walmsley
2c3c73edac
Items control adds the content presenters child as its logical child.
10 years ago
danwalmsley
759a8a845d
initial attempt to set logical children correctly.
10 years ago
Steven Kirk
922b0c5cd7
Don't clear ItemContainerGenerator on template change.
Can't remember why this was there but it was wrong anway - it wasn't
actually removing the items from the presenter panel. Doesn't seem to
break any unit tests so hope for the best...
10 years ago
danwalmsley
b724ddd092
Removed casting to IEnumerable<object>
10 years ago
Steven Kirk
2c8d8179e5
Fix virtualized item selection.
So that recycled items' selection state is set correctly.
10 years ago
Steven Kirk
38afaf1aca
More WIP on adding virtualization to ItemsPresenter.
10 years ago
Steven Kirk
5cd9b98057
Added ItemsControl.ItemTemplate property.
10 years ago