Ensure that native control bounds are properly rounded when UseLayoutRounding is enabled.
This prevents alignment issues with Avalonia's visual tree, especially at non-integer scaling factors.
The calculation now uses LayoutHelper.RoundLayoutValue for each edge of the transformed rectangle,
matching how Avalonia rounds other layout elements.
* Send Page lifecycle events after page transitions
* Cleanup
* Moved the push lifecycle calls out of ExecutePushCore
---------
Co-authored-by: Javier Suárez Ruiz <javiersuarezruiz@hotmail.com>
* Fix TextBox validation error persisting when reverting to same valid value
When a TwoWay binding with validation had an error and the user set the
target back to the same value that was last successfully written to the
source, WriteTargetValueToSource() would bail out early because the
target value matched LeafNode.Value. This prevented WriteValueToSource()
from being called, so the validation error was never cleared.
Add an ErrorType check to the condition in WriteTargetValueToSource() so
that the write-through still happens when there is a pending validation
error, matching the pattern already used in WriteValueToSource() at
line 310.
Fixes#20534https://claude.ai/code/session_01LTinLuE1bsNKaLPuDSNuuw
* Add test for validation error clearing when reverting to same valid value
Reproduces the scenario from #20534 where a TwoWay binding with a
setter that throws on invalid values fails to clear the validation error
when the target is set back to the same value that was last successfully
written to the source.
https://claude.ai/code/session_01LTinLuE1bsNKaLPuDSNuuw
* Remove redundant checks in WriteTargetValueToSource()
* Add failing test for #20688
Unit test created from issue description
* Add a failing test for wrong CacheLength handling
All items would be realized which is obviously wrong
* fix test setup used StackPanel instead of expcected
VirtualizingStackPanel
* Make sure the test actually fails
* update comment
* Fix for focusedElement and focusedIndex
* add another unit test
* Fixes for new test cases
* Addressing Review
* Update tests to match new behavior
* only recycle focused element if it is not null
* Address review
* Address copilot review
* add failing test
* fix StartU estimation
* remove unused sample file
* Implemented new drawn window decorations API
TODO: check if it works on Win32, bring back titlebar automation peer
* Adjusting naming a bit
* Naming / configuration changes
* Various fixes
* popover fix?
* wip
* Address review
* Extra window roles
* WIP
* Fixed drawn titlebar automation
* Purge ExtendClientAreaChromeHints.
* Fixed dynamically enabling drawn decorations
* api diff
* Add automation IDs for drawn decorations buttons
* Resolved the issues
* build
* Retry a few times when Pager isn't available after test is finished
* Only do faulty test detection if asked
* duplicate package reference
* Try disabling faulty tests on appium1
* Fix ExtendClientAreaWindowTests
* Apply initial button states
* Enable CSD shadow for X11
* net8?
* Address review
* more review comments
* Moar review comments
* Extra hit-test checks
* Moar review
* Prefix integration test app exitfullscreen to avoid clashes
* Disable drawn decorations if parts = None
* Respect SystemDecorations value on mac in extend-client-area mode
* Tidy up logic a bit
* Adjust win32 tests to titlebar not being in the tree when CSD are not enabled
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* move gesture events from Gestures to InputElement. Fix holding gesture interactions with context menu
* update api diff
* address review comments
* fix some test types
* rename Cancelled to Canceled
* update api diff
GetAbsoluteBounds() was using TransformToAABB only for the position but
then returning the untransformed Bounds.Size. This caused native controls
inside a Viewbox (or any parent with a visual transform) to be sized
incorrectly - the native window would appear at the right position but
at the wrong (unscaled) size.
Use the full transformed rect from TransformToAABB for both position and
size.
Fixes#13832
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Implement safe TypeCast expression handling
* Add reflection based (still AOT safe) Path.StreamTask and Path.StreamObservable
* Remove RequiresDynamicCode, as it's no longer true
* Stream bindings are not supported
* ObservableStreamPlugin.MatchesType should handle if type itself is observable
* Fix Cecil not finding generic methods
* Fix missing root automation peer in x11/atspi
* Root nodes are special case; fix GetIndexInParentAsync to handle root nodes since their parents == null.
* Make MathUtilities internal
* Remove old overloads from LayoutHelper
* Make DrawingContextHelper.WrapSkiaCanvas internal
* Update API suppressions
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Add failing test for font without head table
* Use a default DesignEmHeight if the font doesn't have one
* Add new font to Should_AddGlyphTypeface_By_Stream
* fix creation of files/folders in subfolder (instead of the root folder)
* fix delete subfolder (instead of the root folder)
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
* Add failing test for #20688
Unit test created from issue description
* Add a failing test for wrong CacheLength handling
All items would be realized which is obviously wrong
* fix test setup used StackPanel instead of expcected
VirtualizingStackPanel
* Make sure the test actually fails
* update comment
* Fix for focusedElement and focusedIndex
* add another unit test
* Fixes for new test cases
* Addressing Review
* Update tests to match new behavior
* only recycle focused element if it is not null
* Address review
* Address copilot review
- Delete SerialDisposableValue class (zero references across codebase)
- Delete SingleOrDictionary<TKey, TValue> class (zero references across codebase)
- Remove unused CompareRoundingErrors private method from Grid.cs
- Remove unused StarDistributionOrderIndexComparer private class from Grid.cs
- Remove unused DistributionOrderIndexComparer private class from Grid.cs
- Remove unused OnGridVisibilityChanged private method from DatePicker.cs
* Make some overlay-related types/members internal
* Make sure that TopLevel is no longer the actual root of the visual tree. This is needed for our future changes.
* API diff
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixed incorrect test
* Make automation to target FocusRoot
* api diff
* Hide WindowBase/EmbeddableControlRoot's parents from automation
* api diff
* Separate automation root and visual root for automation purposes
* Hide ChromeOverlayLayer from public API
* Synchronize WindowBase visibility to VisualRoot
* Hide WindowBase.ArrangeSetBounds
* api diff
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Handle font cmap format 13
* Fallback to last resort fonts as... a last resort
* Tests all fonts in Should_AddGlyphTypeface_By_Stream
* Add last resort font test
* Remove cmap subtable 13 from TestFontNoCmap412.ttf
* Onboard onto Central Package Management
* Remove SharpDX
* Add back <clear /> to NuGet.config package source mapping
* Package mapping
* Inline props where appropriate
* Lost a space