* Fix NUnit test context not being properly set
* Add failing tests
* Capture ExecutionContext to keep async locals
* Remove explicit EstablishExecutionEnvironment call, as it was a bad idea
* Make ExecutionContext usage disabled by default, and only enabled for NUnit
* Add a failing test for #15712.
* Validate StartU at the start of a measure pass.
If any container U size has changed since the last layout pass then `StartU` must be considered unstable as the average container height will have changed.
* Correctly position focused element.
If the focused element has been moved outside the visible viewport due to a realized container size change, then we need to ensure it's positioned correctly.
* We can skip check if StartU is already unstable.
* Don't invalidate virt. panels more than necessary.
* Add another virt panel test.
And revert the expected results for another test to the way they were at the beginning of this PR.
* Tweak container size estimation.
Use the desired size of _measured_ containers instead of the bounds: a layout pass may not had completed on the containers yet, so the bounds may not be up-to-date. Was easier to move the estimation methods out of `RealizedStackElements` and into `VirtualizingStackPanel` itself in order to do this, and arguably makes more sense.
* Add failing test for #16113.
* Convert delegate to ICommand in style setter.
When compiling a binding to e.g. `Button.Command` in a style `Setter`, we were not converting `XamlIlClrMethodPathElementNode` to `XamlIlClrMethodAsCommandPathElementNode` as we were only testing whether the property that the binding was being assigned to is an `ICommand`.
If we detect that we're assigning the binding to a `Setter.Value` then we need to look in the `Setter.Property` to see check whether the property is an `ICommand` too.
Fixes#16113
* Add tests for binding negation operator.
Expected results come from 11.0.x branch.
* Unset and null need to be distinct.
Also remove `ExpressionNode.Reset` as it was doing unneeded stuff and should just be the same as `SetSource(AvaloniaProperty.UnsetValue, null);`.
* Make ExpressionNode.OnSourceChanged accept null.
The previous design assumed that a source of `null` was an invalid input to all types of expression nodes. It turned out that there was a single exception to this rule: the `!` operator can in fact operate on a null value. With this new design we instead have to explicitly check for a null value in every override of `OnSourceChanged ` except in `LogicalNotNode`.
Due to this change, we also have to distinguish between `null` and `(unset)` in `ExpressionNode.SetSource` as well.
Fixes#16071
* Fix comment.
* Add failing KeySpline tests
* Fix Animator for progress values less than zero
---------
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
* Added failing test for #15201.
* Handle nested BindingNotifications.
When #13970 was written, [a check](https://github.com/AvaloniaUI/Avalonia/pull/13970/files#diff-cfb25a491b9452e1815aa2c0d71465aaf81e99792a88a04a1a2ed572fd1930ffR60) was added to ensure that nested `BindingNotification`s didn't happen, and the refactor was written with the assumption that they wouldn't happen.
The problem is that they _do_ happen: when a source object implements both `INotifyDataErrorInfo` and had data annotations, then the nested data validation plugins would each wrap the value coming from the previous plugin in a new `BindingNotification`, resulting in nested `BindingNotifications`.
This adds support for nested binding notifications back in - even though IMO nesting binding notifications is a bug, if we're doing it and we previously supported it then we should continue to support it.
Fixes#15201
* Added failing tests for #15081.
* Provide target property in BindingExpression ctor.
Usually it is not necessary to provide the target property when creating a `BindingExpression` because the property will be assigned when the binding expression is attached to the target in `BindingExpressionBase.Attach`.
This is however one case where `Attach` is not called: when the obsolete `binding.Initiate` method is called and then an observable is read from the `InstancedBinding` without the binding actually being attached to the target object. In this case, prior to the binding refactor in #13970 the value produced by the observable was still converted to the target type. After #13970, because the target property (and hence the target type) is not yet set, the conversion is to the target type is no longer done.
`DataGrid` uses this obsolete method when editing cells, causing #15081. Ideally we'd fix that in `DataGrid` but I'm not happy making this change so close to 11.1, so instead fix this use-case to behave as before.
Fixes#15081
By default disable the `UseSaveLayerRootClip` option: this will re-enable subpixel rendering, fixing #15015 but causing #14270 to reappear.
Until the required API is added to SkiaSharp you have to choose one or the other :(
* Added support for Compatibility profile in Wgl and Glx code
* Fixes after code review
---------
Co-authored-by: Olivier DALET <olivier.dalet@addupsolutions.com>
Avoid race condition where a dispatcher timer callback exectues right after we stopped the timer
Fix not closing a tooltip when its pointer exit event is the last input sent to Avalonia
* test: CommandParameter does not change between CanExecute and Execute
* feat: CommandParameter does not change between CanExecute and Execute
* test: update
* add isStroked overload for IGeometryContext
* move IGeometryContextEx
* fix Fill Path line
* remove added whitespaces
* close a figure to non-stroke lines with a line
* add geometry tests
* add wpf test files
* Added a test for tracking path closure with missing strokes for various line caps/joins
* add IsStroke overload for other segments
* update tests
* Skip line join test for closed geometry with holes for now
---------
Co-authored-by: Nikita Tsukanov <keks9n@gmail.com>
* use tap size as default size for scrolling start. reset IsGestureRecognitionSkipped when pointer is released
* use static default constant for scroll distance
* fix typo
* Ported the old Vulkan PR
* chop-chop
* Support for external objects in vulkan backend
* Fixed structure type
* Removed debug code
* sln fix
* Don't force vulkan on windows
* Fixed ShowGridLines = false crash
Fixed "System.InvalidOperationException: 'The control GridLinesRenderer already has a visual parent Grid (Name = grid) while trying to add it as a child of Grid (Name = grid).'" when set ShowGridLines = false and resize.
* Fixed grid lines renderer (fixes ShowGridLines binding)
When changing ShowGridLines property GridLinesRenderer is not updating (create/remove/set bounds). Need to call InvalidateArrange -> ArrangeOverride -> EnsureGridLinesRenderer.
* Fix native menu bar tooltip
* Make ToolTip tests more reliable
* Increase MacOS_Native_Menu_Has_ToolTip_If_Defined sleep delay
* Disable MacOS_Native_Menu_Has_ToolTip_If_Defined, as it fails way too often