Dan Walmsley
4aa51e80da
fix more tests.
6 years ago
Dan Walmsley
87c326a8fd
fix mocks.
6 years ago
Dan Walmsley
2ad4002686
fix unit tests.
6 years ago
Dan Walmsley
0148106f54
Seperate RenderScaling from DesktopScaling.
6 years ago
Nikita Tsukanov
d355007c57
Extracted runtime XAML loader to a separate package
6 years ago
Steven Kirk
0301d80c30
Added failing test for removing selected item with BeginInit.
6 years ago
Steven Kirk
41831066c2
Revert "Fix selection after deleting an item."
6 years ago
Dan Walmsley
1c099b6e8c
add failing unit tests for cases.
6 years ago
Dan Walmsley
de87609de1
add failing unit test.
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
73a2637eed
Added failing test for removing selected item with BeginInit.
6 years ago
Dan Walmsley
a5499a908d
remove usings.
6 years ago
Dan Walmsley
162583b2de
add a failing unit test.
6 years ago
Dan Walmsley
9f6c52711e
add more relativepanel tests.
6 years ago
FoggyFinder
1c8541c060
fix typo & add missing attribute
6 years ago
Steven Kirk
8176ef6648
Added failing test.
Items are being materialized twice when not using virtualization.
6 years ago
Steven Kirk
a8b7e87938
Added IRecyclingDataTemplate.
In #4218 we imported `IElementFactory` from WinUI which is broadly analogous to a recycling datatemplate for lists. In Avalonia this implement `IDataTemplate` in order to have a common base class for all types of data templates.
The problem with this is that `IDataTemplate` already had a `SupportsRecycling` property which is incompatible with the way recycling is implemented in `IElementFactory`. Instead, introduce an `IRecyclingDataTemplate` to signal data templates that support recycling.
6 years ago
Dan Walmsley
b64ca7d5b7
add more unit tests for relative panel
6 years ago
Dan Walmsley
4b9cf819ba
acceptable relativepanel implementation.
6 years ago
Dan Walmsley
df1bfd60b5
skip test.
6 years ago
Dan Walmsley
835e87e8cd
add a failing relative panel test.
6 years ago
Dan Walmsley
be55373811
add some unit tests and tidy relative panel
6 years ago
Dan Walmsley
ccd5a92725
apply fix to timepicker tests also.
6 years ago
Steven Kirk
f1e4a6a50a
Register a font manager.
`DatePickerTests` are proving to be flaky, register the services that are reported missing when they fail.
6 years ago
amwx
c9a4543d02
Skip failing time picker test
6 years ago
amwx
61294fcaff
Add unit tests
6 years ago
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
af2d3205e3
Rename timepicker selectedtime test
6 years ago
amwx
e1ba96b0f5
Add some unit tests
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