Steven Kirk
2807cbe6cb
Make LayoutManager disposable.
And dispose it on `TopLevel` close: this allows layout passes to be run before a window/popup is shown but prevents it being run after close.
6 years ago
Steven Kirk
d3c3741bec
No longer need to pass root to ExecuteInitialLayoutPass.
6 years ago
Steven Kirk
7694fc0484
Don't run layout passes on hidden TopLevels.
To do this we need to pass the root to `LayoutManager`.
Fixes #4161
6 years ago
amwx
0863b29d09
Rename existing DatePicker control
6 years ago
Steven Kirk
363b2a0489
Fix failing tests.
`ScrollContentPresenter` now coerces offset so it can only be set after a viewport has been calculated.
6 years ago
Steven Kirk
fc711e7c86
Measure PopupRoot to MaxAutoSizeHint.
On win32 popup's don't receive `WM_GETMINMAXINFO` so instead query the monitor info for the max work area,
6 years ago
Steven Kirk
c3a5c48d6f
Raise ScrollChanged when layout updated.
To be consistent with WPF/UWP `ScrollChanged` should be raised when layout finishes updating, rather than when the individual properties are changed.
6 years ago
Steven Kirk
d46265233d
Raise LayoutUpdated at the end of layout pass.
This attempts to match the behavior of `LayoutUpdated` in WPF and UWP.
6 years ago
Nikita Tsukanov
165da1c678
Naming
6 years ago
Max Katz
53cb9d266d
Add ToolTip :open pseudo class tests
6 years ago
Jumar Macato
cf7a9122b4
Fix merge conflicts
6 years ago
Dan Walmsley
817476ef77
implement a pressed mixin.
6 years ago
Nikita Tsukanov
996e602bf8
Implemented custom format support for clipboard
6 years ago
Dan Walmsley
c961df9ee1
fix unit for listbox test.
6 years ago
Steven Kirk
9df84abbf3
Bring selected TreeViewItem into view after layout finishes.
6 years ago
Steven Kirk
2255518851
Apply auto-select at end of batch update.
6 years ago
Steven Kirk
9dc9f9deba
Ensure selection is reported correctly during batch update.
6 years ago
Steven Kirk
cd37520b71
Trim invalid selection when Source first assigned.
`SelectionModel` can have a selection set before its `Source` is initialized. In this case, be sure to trim invalid selections from the model before continuing.
Fixes #3919
6 years ago
Dan Walmsley
4bc1801c2a
fix popup tests.
6 years ago
Steven Kirk
dcdaf5e0bf
Don't raise ResourceChanged on reparenting...
...when the new parent isn't attached to the tree. This prevents us sending a load of useless `ResourcesChanged` events.
6 years ago
Steven Kirk
bd0b894271
Fix UseLayoutRounding calculations.
Ported `RoundLayoutSize` and `RoundLayoutValue` from WPF and use these to calculated layout rounding.
Fixes #3467 .
6 years ago
Steven Kirk
21bddb1ced
Added test that fails after resource refactor.
`Changing_Resource_In_Templated_Parent_Should_Affect_Templated_Child` now fails because resource changed messages no longer traverse into templated children.
6 years ago
Dariusz Komosinski
93320e4759
Only subscribe to Path.Data when Path is attached to the visual tree.
6 years ago
Dan Walmsley
2f1974684e
fix unit test.
6 years ago
Steven Kirk
7f87c2e74a
Don't raise SelectionModel.PropertyChanged during update.
6 years ago
Steven Kirk
8e29811c91
Added failing test for #3934 .
6 years ago
Deadpikle
8fa6c05b7d
Another failing test for selection handling
6 years ago
Deadpikle
62e7dbded9
Add more tests for selection adjustments
6 years ago
Deadpikle
c1dc0017d4
Add tests from chat with @grokys
6 years ago
Deadpikle
ba6adb78c1
Add failing test for no items in TabControl
6 years ago
Steven Kirk
9ef91f9e10
Fix notifications when removing parent item.
6 years ago
Steven Kirk
fcdac73e75
Fix select range logic.
Make sure the item we're selecting is within the requested range. Also refactored the unit tests to do a simple test on `SelectedIndices` instead of using `IsSelectedWithPartial` because both can't really be tested together using the old testing method.
6 years ago
Steven Kirk
2b5d7fb28d
Don't allow selection of non-expanded TreeViewItems.
And remove child selection when a `TreeViewItem` is un-expanded.
This is necessary because we don't get enough information about a materialized `TreeViewItem` to select it when materialized, so the `SelectionModel` and `TreeViewItem` selection state gets out of sync.
6 years ago
Steven Kirk
d5f0110ca6
Raise SelectionChanged when nested children change.
6 years ago
Steven Kirk
8230684a41
Added failing test for #3918 .
6 years ago
Dan Walmsley
bcfb9ea840
skip broken test.
6 years ago
Dan Walmsley
380d43f2f9
skip broken test.
6 years ago
Steven Kirk
bc079008d1
Remove usage of deprecated input APIs.
6 years ago
Steven Kirk
f06eaf38f8
Use correct unit test AppBuilder.
A reference was added to `Avalonia.ReactiveUI` from `Avalonia.Controls.UnitTests` which caused the incorrect `AppBuilder` to be resolved.
6 years ago
Steven Kirk
c9a385bd5a
Allow SelectionNode children to change.
Make `SelectionModelChildrenRequestedEventArgs.Children` an observable, so that the we can react to the children collection object changing, as well as the children inside the collection changing.
Upstream issue: https://github.com/microsoft/microsoft-ui-xaml/issues/2404
6 years ago
Nikita Tsukanov
636c6800cf
Merged LostFocus to ITopLevelImpl
6 years ago
Steven Kirk
2fcde9e34d
Use OnApplyTemplate instead of OnTemplateApplied.
- More similar to WPF API
- Less bug-prone (see #3744 )
`OnTemplateApplied` still exists, but is deprecated and does nothing.
6 years ago
Steven Kirk
dc75bf512a
Run sizing tests with both Show and ShowDialog.
One test now failing with `ShowDialog` due to #3843 .
6 years ago
Dariusz Komosinski
1624e88ba3
Remove Window.ShowDialog variant that takes IWindowImpl.
6 years ago
Steven Kirk
95735d239b
Measure Window to MaxAutoSizeHint.
- Renamed `MaxClientSize` to `MaxAutoSizeHint`
- On Windows get its value from `WM_GETMINMAXINFO` message
- Remove `ILayoutRoot.MaxClientSize` as it's not used any more
6 years ago
Steven Kirk
df6dc0abb7
Fix window sizing tests.
We need to make sure the window is being measured the correct number of times to know that the measure pass is correct.
6 years ago
Steven Kirk
ec24030bac
Added another failing PopupRoot test.
6 years ago
Steven Kirk
908eef0b0d
Added failing tests for #3796 .
6 years ago
Steven Kirk
c6860ceefa
Bypass ArrangeCore logic in top-level controls.
Top-level controls cannot have a `Bounds` offset, and their `(Min)/(Max)/Width` and `(Min)/(Max)/Height` reflects the client size of the actual window, so don't need to be applied at the layout level.
Fixes #3784
6 years ago
Steven Kirk
af950096cc
Added failing test for #3784 .
Had to refactor the `MockWindowingPlatform` a bit.
6 years ago