5474 Commits

Author SHA1 Message Date
Tom Edwards f4b5dc95b7 Use SetCurrentValue for all IMenuItem properties (#20682)
* Add IMenuItem binding tests

* Use SetCurrentValue for all IMenuItem properties
Fix XMLDoc comments for MenuItem being inherited from an internal type
2026-02-13 18:28:21 +00:00
Julien Lebosquain 2185ce04e7 Use KeySymbol for AccessKey (#20662)
* Change AccessText.AccessKey to a string

* Use KeySymbol for AccessKey

* Update API suppressions

* Fix tests
2026-02-13 09:18:59 +00:00
Steven Kirk d9a6ae517f Hide binding plugins and disable Data Annotations validation by default (#20623)
* Make binding plugin API internal.

Making everything pluggable like has performance implications even if the plugins are never customized (which will be the 99% case).

`IPropertyAccessor` is used in `CompiledBindingPathBuilder` so needs to be kept public for the moment.

* Disable Data Annotations validation by default.

It [conflicts with `CommunityToolkit.Mvvm`](https://github.com/AvaloniaUI/Avalonia/issues/8397) which is now the default MVVM framework, so require it to be enabled in the `AppBuilder`.

* Update API supressions.

* Add back missing using

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-02-11 17:36:04 +00:00
Jan Kučera a48c415026 FindAncestorOfType and FindDescendantOfType with predicates (#20661)
* Find ancestors/descendants with a predicate

* Use Predicate instead of Func

* Find ancestors/descendants with a predicate

* Use Predicate instead of Func

* Predicate<Visual> to Predicate<T>

---------

Co-authored-by: Jan Kučera <miloush@users.noreply.github.com>
2026-02-11 11:03:49 +00:00
Petar Tasev b57223eb1b Fix TabItem's Content inheriting TabControl's DataContext instead of TabItem's (#20541)
* Child inherit DataContext from TabItem

* Remove whitespace changes

* Fix nullability error

* Fix using Julien's solution
2026-02-11 10:53:07 +00:00
Julien Lebosquain 816fb91d4e Move GetWindowsZOrder to IWindowingPlatform (#20633)
* Move GetWindowsZOrder to IWindowingPlatform

* Update API suppressions
2026-02-10 11:08:16 +00:00
Jan Kučera 08fcb8b1c2 Capture source change notification (#20656)
* Fire CaptureChanging event when source changes

* Do not notfiy platform if only source changed

* Notify ancestors of element to be captured if none yet

* Pointer capture notify on source change tests

---------

Co-authored-by: Jan Kučera <miloush@users.noreply.github.com>
2026-02-10 09:42:31 +00:00
Nikita Tsukanov 30b451da52 Fix Border clip regression (#20648) 2026-02-09 15:08:59 +00:00
Julien Lebosquain 02c5ff41ff Remove obsolete members from Avalonia.Controls (#20617)
* Remove IActivatableApplicationLifetime

* Remove ItemContainerGenerator.ContainerFromIndex/IndexFromContainer

* Remove TreeItemContainerGenerator

* Remove SystemDialog

* Remove IInsetsManager.DisplayEdgeToEdge

* Remove Screen.PixelDensity/Primary

* Remove Screens.ScreenFromWindow

* Remove Popup/ContextMenu.PlacementMode

* Remove ToggleButton.Checked/Unchecked/Indeterminate

* Remove AppBuilder.LifetimeOverride

* Remove IApplicationPlatformEvents

* Remove TabItem.SubscribeToOwnerProperties

* Update API suppressions
2026-02-06 11:33:18 +00:00
Nikita Tsukanov 697cba7193 Composition system SP1 (#20497)
* baseline benchmark

* Composition system SP1

* Allow reusing the same BitmapCache object for multiple visuals

* Fix warnings

* Address review

* API suppressions

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-02-06 11:15:47 +00:00
Steven Kirk 70f3bef705 Add CompiledBinding.Create factory methods from LINQ expressions (#20443)
* Reminder for future me.

* Move compiled bindings to Avalonia base.

* Update suppressions.

* Tweaked `BindingExpressionVisitor`.

And documented public (internal) API.

* Fix ncrunch config.

* Add comprehensive unit tests for BindingExpressionVisitor.

Tests cover all supported features including property access, indexers,
AvaloniaProperty access, logical NOT, stream bindings, and type operators.
Also includes tests for unsupported operations that should throw exceptions.

Discovered bug: IsAssignableFrom check at line 139 is backwards, causing
upcasts to incorrectly throw and downcasts to be incorrectly ignored.
Bug is documented with skipped tests showing expected behavior and passing
tests documenting current broken behavior.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Fix backwards IsAssignableFrom check in BindingExpressionVisitor.

Fixed the inheritance cast check which was inverted, causing:
- Upcasts (derived→base) to incorrectly throw exceptions
- Downcasts (base→derived) to be incorrectly ignored

Changed line 139 from:
  node.Operand.Type.IsAssignableFrom(node.Type)
to:
  node.Type.IsAssignableFrom(node.Operand.Type)

This correctly identifies safe upcasts (which are ignored) vs unsafe
downcasts (which throw exceptions).

Updated tests to remove skip attributes and removed the temporary tests
that documented the broken behavior. All 33 tests now pass.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Allow downcasts and all reference type casts in binding expressions.

Changed the cast handling to allow both upcasts and downcasts for reference
types. This makes casts actually useful in binding expressions while still
rejecting value type conversions that would require actual conversion logic.

The logic now checks:
- Both types must be reference types (not value types)
- One type must be assignable to/from the other (either direction)

This allows practical scenarios like:
- Upcasts: (BaseClass)derived
- Downcasts: (DerivedClass)baseInstance
- Casting through object: (TargetType)(object)source

The binding system will gracefully handle any runtime type mismatches.

Updated tests to verify downcasts are allowed and added test for casting
through object pattern.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Add clarifying test for cast transparency in binding expressions.

Added test showing that casts are transparent in property chains.
For example, ((TestClass)x).Property produces just one node for the
property access - the cast doesn't create additional nodes.

This clarifies that empty nodes for (TestClass)x is correct behavior:
- Empty nodes = bind to source directly
- The cast is just a type annotation, transparent to the binding path

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Fix: Casts should create ReflectionTypeCastNode, not be transparent.

Casts were incorrectly being treated as transparent (not creating nodes),
but CompiledBindingPath uses TypeCastPathElement which creates FuncTransformNode.
For consistency and correctness, BindingExpressionVisitor should also create
cast nodes using ReflectionTypeCastNode.

Changes:
- Convert expressions now create ReflectionTypeCastNode
- TypeAs expressions now create ReflectionTypeCastNode
- Both upcasts and downcasts create nodes (runtime checks handle failures)

Examples:
- x => (TestClass)x → 1 node (cast)
- x => ((TestClass)x).Prop → 2 nodes (cast + property)
- x => x.Child as object → 2 nodes (property + cast)

This matches the behavior of CompiledBindingPathBuilder.TypeCast<T>().

Updated all related tests to verify cast nodes are created.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Use compiled cast functions instead of reflection-based type checks.

Changed from ReflectionTypeCastNode (which uses Type.IsInstanceOfType) to
FuncTransformNode with a compiled cast function. This matches how
CompiledBindingPath handles TypeCastPathElement and provides better
performance by avoiding reflection.

The CreateCastFunc method compiles an expression `(object? obj) => obj as T`
which generates efficient IL similar to the 'is T' pattern used in
TypeCastPathElement<T>, rather than using reflection-based type checks.

Performance improvement:
- Before: Type.IsInstanceOfType() reflection call for each cast
- After: Compiled IL using 'as' operator (same as TypeCastPathElement<T>)

Updated tests to expect FuncTransformNode instead of ReflectionTypeCastNode.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Reuse TypeCastPathElement<T> cast function directly.

Instead of compiling our own cast expression, extract the Cast delegate
directly from TypeCastPathElement<T>. This ensures we use the exact same
code path as CompiledBindingPath, avoiding any potential behavioral
differences and code duplication.

Benefits:
- Code reuse - single implementation of cast logic
- Consistency - same behavior as CompiledBindingPathBuilder.TypeCast<T>()
- No duplicate expression compilation logic

Implementation uses reflection to create the closed generic type and
extract the pre-compiled Cast delegate, which is still more efficient
than reflection-based type checks at runtime.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Revert to lambda compilation approach for cast functions.

Reverted from using TypeCastPathElement<T> back to compiling lambda
expressions directly. The lambda approach is cleaner and more straightforward:

Benefits of lambda compilation:
- No Activator.CreateInstance call (avoids reflection for construction)
- More direct - creates exactly what we need
- No coupling to TypeCastPathElement internal implementation
- Simpler code flow

The compiled lambda generates the same efficient IL code (using 'as' operator)
as TypeCastPathElement<T> does, just without the indirection.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Code cleanup: Fix XML docs and remove unused usings.

- Changed CreateCastFunc XML docs to use <remarks> tag for better formatting
- Removed unused 'using Avalonia.Data;' from tests
- Removed redundant '#nullable enable' from tests

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Refactor BindingExpressionVisitor to use CompiledBindingPathBuilder.

Changes BindingExpressionVisitor to use CompiledBindingPathBuilder instead of
directly creating ExpressionNode instances, unifying the approach with
compile-time XAML bindings. Adds new BuildPath() method that returns
CompiledBindingPath, while maintaining backwards compatibility through the
existing BuildNodes() wrapper method.

Key changes:
- Replace internal List<ExpressionNode> with CompiledBindingPathBuilder
- Refactor all visitor methods to call builder methods
- Add accessor factory methods and implementations for property access
- Support AvaloniaProperty, CLR properties, arrays, indexers, streams, casts
- Update tests to expect PropertyAccessorNode, StreamNode, ArrayIndexerNode

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Remove CompiledBindingPathFromExpressionBuilder in favor of BindingExpressionVisitor.

Now that BindingExpressionVisitor has been refactored to use
CompiledBindingPathBuilder and provides a BuildPath() method, the test-only
CompiledBindingPathFromExpressionBuilder class is redundant and can be removed.

Changes:
- Replace CompiledBindingPathFromExpressionBuilder.Build() with
  BindingExpressionVisitor<TIn>.BuildPath() in BindingExpressionTests
- Delete CompiledBindingPathFromExpressionBuilder.cs test file
- All 122 tests in BindingExpressionTests.Compiled continue to pass

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Move test-only methods from production code to test extensions.

Removes BindingExpression.Create and BindingExpressionVisitor.BuildNodes
from production code since they were only used by unit tests.

Changes:
- Remove BindingExpression.Create<TIn, TOut> method
- Remove BindingExpressionVisitor.BuildNodes method
- Add BindingExpressionVisitorExtensions in Base.UnitTests
- Add BindingExpressionExtensions in LeakTests
- Add static helper methods in test classes to reduce noise

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Add public CompiledBinding.Create factory methods from LINQ expressions.

Adds two static factory methods to create CompiledBinding instances from
lambda expressions using BindingExpressionVisitor.BuildPath():

- Create<TIn, TOut>(expression, converter, mode)
  Creates binding without explicit source (uses DataContext)

- Create<TIn, TOut>(source, expression, converter, mode)
  Creates binding with explicit source

This provides a type-safe, ergonomic API for creating compiled bindings
from code without string-based paths.

Usage:
  var binding = CompiledBinding.Create(viewModel, vm => vm.Title);
  textBlock.Bind(TextBlock.TextProperty, binding);

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Merge CompiledBinding.Create overloads and add all binding property parameters.

Consolidates the two Create method overloads into a single method with source
as an optional parameter. Adds optional parameters for all CompiledBinding
properties (priority, converterCulture, converterParameter, fallbackValue,
stringFormat, targetNullValue, updateSourceTrigger, delay) per PR feedback.

Properties that default to AvaloniaProperty.UnsetValue (source, fallbackValue,
targetNullValue) use null-coalescing to convert null parameter values.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* (Re-)update suppressions.

* Add missing using.

* Fix ncrunch build.

* Remove file I committed by accident.

* PR feedback.

* Store static members outside generic class.

Based on PR feedback.

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-05 18:28:33 +00:00
Javier Suárez 424863d5ff Add PlaceholderForeground property to TextBox, AutoCompleteBox, CalendarDatePicker, NumericUpDown (#20303)
* Added WatermarkForeground property

* Added samples

* Added unit tests

* Added render tests

* Fix merge issues

* Updated render tests

* Standardize watermark foreground naming

* Pending changes

* More changes

* Use UseFloatingPlaceholder

* Fix tests
2026-02-05 16:35:47 +00:00
Julien Lebosquain 9f02346cd6 Headless NUnit: Handle async SetUp/TearDown (#20612)
* Headless NUnit: Fix TearDown not always working

* Headless NUnit: Handle async SetUp/TearDown
2026-02-05 08:23:20 +00:00
Julien Lebosquain 6d45ee8cd7 Make NUnit tests visible in Rider again (#20594) 2026-02-04 03:15:15 +00:00
Julien Lebosquain 656d691940 Move ConstructorArgumentAttribute and remove BindingMode from ReflectionBinding constructor (#20589)
* Move ConstructorArgumentAttribute to Avalonia.Base assembly

* Move IOptionalFeatureProvider to Avalonia namespace

* Remove BindingMode from ReflectionBinding constructor

* Update API suppressions
2026-02-04 03:14:54 +00:00
Julien Lebosquain 4c3c9aa99f Add AlphaFormat to ILockedFramebuffer (#20556)
* Add AlphaFormat to ILockedFramebuffer

* Update API suppressions
2026-01-30 09:55:40 +00:00
Matt Lacey 5361b98ce1 #19962 Add AXAML Source Information to debug Builds (#20524)
* #19962 Add AXAML Source Information to debug Builds

* SimplifyXamlSourceInfo

* Add XamlSourceInfo for as many elements as possible

* Add tests to confirm XamlSourceInfo is set for all types

* Remove property only added for debugging during development

* update skipped test so it runs (even though it doesn't yet pass)

* Wrap XamlAstNewClrObjectNode instead of XamlAstObjectNode, run transformer late

* Remove unsupported value types from the More_Resources_Get_XamlSourceInfo_Set

* Fix Document property not being set in runtime parser

* Add a dedicated CreateSourceInfo parameter for RuntimeXamlLoaderConfiguration, instead of reusing DesignMode

* Inherit real XamlValueWithManipulationNode, move actual manipulation to a separate class

* Fix group transformers by unwrapping manipulation nodes first

* minor Resource related test change

* Update public API as agreed

* Add new failing tests for the dictionaries

* Fix randomly failing tests, that depend on the test order

* Fix assert

* Rename AvaloniaXamlResourceTransformer

* Emit XamlSourceInfo from AvaloniaXamlResourceTransformer

* Rename AvaloniaXamlIlResourceTransformer for consistency

* Cleanup comments

* Remove XamlSourceInfoValueWithManipulationNode, use standard XamlValueWithManipulationNode

* Add new RuntimeXamlLoaderDocument.Document property

* Use UriBuilder trick to support unix paths on windows

* Add private AttachedProperty for avalonia objects, instead of always using weak table

* Fix wrong UriBuilder usage and add more test assets

* Fix "Invalid URI" exception

---------

Co-authored-by: KimHenrik <kimhenrik@outlook.de>
Co-authored-by: Max Katz <maxkatz6@outlook.com>
2026-01-30 08:19:09 +00:00
Julien Lebosquain 1ee1509352 Fixes several simple TODO12 (#20544)
* Remove obsolete TextInputMethodClient.ShowInputPanel method

* Merge Move and Move private in KeyboardNavigationHandler

* Change Inline.TextDecorations type to AttachedProperty

* Change TextSearch.GetText/SetText parameter to Interactive

* Remove Design.SetPreviewWith overload

* Replace JSWebWorkerClone with JSWebWorker

* Remove StringTokenizer

* Update API suppressions

* Add reflection comment to RenderWorker
2026-01-27 12:55:05 +00:00
Julien Lebosquain 3c88142694 Make Screen abstract (#20529) 2026-01-24 09:41:04 +00:00
Benedikt Stebner 1bce702bd4 Introduce TextOptions (#20107)
* Introduce TextOptions API

* Store BaselinePixelAlignment as byte. Move to a dedicated file.

* Update API suppressions

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-01-23 11:22:27 +00:00
Julien Lebosquain ff0a61486d Update headless xUnit support to v3 (#20481)
* Update headless xUnit support to v3

* Update API suppressions
2026-01-17 17:16:07 +00:00
Steven Kirk 1086d9b5b0 Move compiled bindings to Avalonia.Base. (#20439)
* Reminder for future me.

* Move compiled bindings to Avalonia base.

* Update suppressions.

* Update API suppressions

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-01-16 11:52:50 +00:00
Julien Lebosquain 8215194f32 Reset cached transform on PopEffect (#20474) 2026-01-15 15:17:07 +00:00
Julien Lebosquain c8f59f84af Fix xUnit warnings in AnimationIterationTests (#20459) 2026-01-13 13:55:18 +00:00
Tim Miller e8a0bee928 Null Reference Check for Animation keyframes (#20422)
* Null Reference Check for Animator

* Add Animation_Completes_Gracefully_When_First_KeyFrame_Value_Is_Null

* Use neutralValue
2026-01-13 09:37:06 +00:00
Benedikt Stebner e8424283fe Universal GlyphTypeface implementation (#19852)
* Introduce a universal IGlyphTypeface implementation that does not rely on any platform implementation

* Revert changes

* Fix Android

* Make the test happy

* Fix build

* Update baseline

* Fix naming

* Fix headless

* Move interfaces to dedicated files
Make GlyphTypeface.GlyphCount an integer

* Fix GlyphCount

* Make IGlyphTypeface NotClientImplementable

* Make sure we cache platform typefaces by their desired name, style, weight and stretch

* Update baseline

* Only use IGlyphTypeface

* Fix Android

* Try to clear the buffer before we encode somethimg

* Add needed test font

* Add more unit tests

* Reduce allocations

* Remove Direct2D1 test files

* More tests

* More complete table implementations

* More adjustments

* Use batch APIs

* Handle invalid timestamps

* Update baseline

* Introduce a CharacterToGlyphMap struct for faster access

* Remove AggressiveInlining

* Remove AggressiveInlining

* Make the head table optional for legacy fonts

* Remove Load method. Fix TextBlockTests

* Fix nullables

* Remove redundant folder

* Update Api baseline

* revert diff helper changes

* revert changes

* Use bare minimum font for Headless platform and introduce a test font manager that uses the Inter font for testing.

* Add missing font file for Headless platform

---------

Co-authored-by: Gillibald <stebner@avaloniaui.net>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-01-09 15:07:28 +00:00
Steven Kirk 5d3a9c167a Fix BindingExpression.LeafNode throwing when nodes list is empty (#20442)
Make LeafNode property nullable and return null when the binding expression
has no nodes (e.g., when using a constant source with a converter but no path).
This fixes an ArgumentOutOfRangeException that occurred when accessing
LeafNode or Description properties on such bindings.

Fixes #20441

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 13:43:55 +00:00
Youssef Victor c9e210eb70 Update to xunit.v3 (#20331)
* Update to xunit.v3

* Little more progress

* More fixes

* Keep VSTest supported

* Adjust Nuke

* Few fixes

* Fix for xunit 2

* Fix GetData override

* Adjust

* Use MTP for xunit 2

* Fix test

* Better fix

* --no-progress

* Few more fixes

* no progress

* Fix test

* Better fix

* TRX

* Move to Directory.Build.props

* Unify on MTP v2

* Update

* Update to stable

* 1.0.1

* 1.0.2

* Fix some warnings

* Fix more warnings

* Fix more warnings
2026-01-08 20:46:44 +00:00
Steven Kirk f2fc8d02f4 Move IBinding to BindingBase and tidy up some binding APIs (#19589)
* Update ncrunch config.

* Tidy up reflection and multi-binding APIs:

- Move `BindingBase` and `MultiBinding` into Avalonia.Base
- `BindingBase` becomes a true base class for all bindings, and contains only the `Instance` method
- Properties common between reflection and compiled bindings are moved into `StandardBindingBase`
- `Binding` is moved to Avalonia.Base and renamed to `ReflectionBinding`
- A compatibility shim for `Binding` remains in Avalonia.Markup
- Remove `IBinding` and `IBinding2`
- Remove `ITreeDataTemplate's usage of `InstancedBinding`
- Remove `NativeMenuBarPresenter`s usage of `InstancedBinding`
- Remove `InstancedBinding` as it is now unused

This required an update to the DataGrid submodule: cell data validation has been temporarily removed as this used `InstancedBinding`.

* `Instance()` => `CreateInstance()`.

The use of "Instance" as a verb is quite unusual apparently ;)

* Seal classes where appropriate.

* Seal classes where appropriate.

* Remove `StandardBindingBase`.

Simply duplicate the members in reflection and compiled binding classes.

* Delete deleted submodule directory.

* Add missing attribute.

Fixes compile error.

* Fix reference to removed class.

* Update suppressions.
2026-01-08 17:33:14 +00:00
Julien Lebosquain 2fd35c585d Update NUnit to v4 (#20372) 2026-01-07 02:27:04 +00:00
Julien Lebosquain 71ce62ae32 Remove legacy Diagnostics project (#20332)
* Remove legacy Diagnostics project

* Remove DataGrid submodule
2026-01-07 01:24:28 +00:00
Tom Edwards f1703dd784 Add DrawingImage.Viewbox (#18913)
* Added DrawingImage.Frame: a rectangular region of `Drawing`, in device independent pixels, to display when rendering the image

* Renamed Frame to Viewbox
Added test
2026-01-06 13:40:21 +00:00
Julien Lebosquain ee748802b3 Enable nullability in various test projects (#20374)
* Enable nullability in RenderTests

* Enable nullability in LeakTests

* Enable nullability in Skia.UnitTests

* Enable nullability in Generators.Tests

* Enable nullability in DesignerSupport.Tests

* Enable nullability in Build.Tasks.UnitTests
2025-12-30 09:10:50 +00:00
Julien Lebosquain 960cb39414 Enable nullability in Controls.UnitTests (#20373) 2025-12-30 09:10:37 +00:00
Julien Lebosquain c68111294f Enable nullability in Base/Markup/Markup.Xaml unit tests (#20346)
* Enable nullability in UnitTests

* Enable nullability in Base.UnitTests

* Enable nullability in Markup.UnitTests

* Enable nullability in Markup.Xaml.UnitTests
2025-12-29 09:24:49 +00:00
Ge 62597de97c Add support for parsing BoxShadows with color functions (#20321)
* Add support for parsing BoxShadows with colors expressions with parentheses

* Added BoxShadowsTests

* BoxShadow parsing should also respect parentheses

* Add StringSplitter

* Fix test

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* StringSplitter should not accept same bracket pairs

* Returns empty array only when input is null

* Add StringSplitterTests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-23 11:24:55 +00:00
Julien Lebosquain a7f09f4315 Delete Direct2D1 test files (#20333) 2025-12-23 06:37:00 +00:00
Wiesław Šoltés 2bd109c808 Fix System.InvalidOperationException Dispatcher job loop detected (#20310) 2025-12-19 18:20:32 +00:00
Julien Lebosquain 64b63fa5d2 Fix common warnings (#20311) 2025-12-19 11:45:30 +00:00
Julien Lebosquain d84d881729 Restore integration tests (#20296)
* Restore integration tests

* Fix TransparentPopup test not closing on macOS
2025-12-19 10:05:51 +01:00
Julien Lebosquain ce0a1c6b3e Update dependencies (#20139)
* Update dependencies

* Partially revert appium upgrades

* Fix integration tests
2025-12-17 15:23:32 +01:00
dpse 12d7ff1bfc Apply NumberFormat changes to NumericUpDown (#20248)
* Add NumericUpDown NumberFormat failing test

* Force text update when NumberFormat has changed

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-12-17 00:45:40 +00:00
Tom Edwards b7cb9e5770 Unify selection event handling for all SelectingItemsControl types plus TreeView (#19203)
* Unify selection event handling for all SelectingItemsControl types plus TreeView
- Controls can decide whether to select on press/release, or introduce their own logic
- Container types handle events and can decide whether to forward them on to their owner
- Corrected various cases where controls checked whether a button was held when the event occurred, rather than whether it triggered the event
- Replaced various hardcoded modifier key checks with uses of PlatformHotkeyConfiguration
- ListBox no longer cares if you swipe before releasing touch (unless that triggers a gesture)
- TreeViewItem is now selected on touch/pen release

* API change requests

* Review comments
2025-12-16 17:54:58 +00:00
Javier Suárez b66f5ada75 [Feature] Add FillRule property for Polyline/Polygon (#20159)
* Implement FillRuleProperty on Polyline

* Implement FillRule Property on Polygon

* Add tests

* Added comments to new public APIs

* Added more comments

* More tests

* More tests

* Updated API

* Added render tests

* More render tests

* Reintroducing the original PolylineGeometry constructor

* Updated API file

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-12-16 16:12:31 +00:00
Julien Lebosquain 37526dc904 Fix dnx random failures (#20284)
* Try to fix dnx random failure

* Use full paths for WebAppDir everywhere

* Call dnx explicitly on CI

---------

Co-authored-by: Max Katz <maxkatz6@outlook.com>
2025-12-16 11:55:58 +00:00
IanRawley 7a340a6579 XYFocus should skip effectively disabled controls (#20241)
* Added failing unit test

* Changed IsValidCandidate to check effective values

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-12-15 20:09:19 +00:00
Tim Miller 367d8b293b [Avalonia.Native] Use relative placement for detecting drag and drop locations. (#20280)
* Use relative position of view for drag and drop

* Add Drag And Drop Test

* Add AutomationProperties
2025-12-15 17:18:14 +01:00
Washi 7369175c2d Reduce Allocations in Text Rendering (#20175)
* Reduce allocations for FontFamily.Parse

* Turn Trie data into static data

* Use static lambda in s_cachedLanguage.GetOrAdd

* Make LineBreakEnumerator+LineBreakState a ref struct to avoid allocations

* Use backing field for storing trie data in debug builds
2025-12-15 10:48:51 +00:00
Max Katz 09fefed1a4 Use standalone Bun to build JS projects instead of NodeJS (#20243)
* Replace node.js npm with bun

* Run bun test target, instead of direct npm, remove `SkipPreviewer` prop

* Add "--yes" argument to dnx command

* Remove unused scripts
2025-12-09 22:06:24 +00:00
Julien Lebosquain 884051ed10 Fix several issues with ExtendClientAreaToDecorationsHint on Windows (#20217)
* Add extended client area Win32 integration tests

* Fix Win32 extended client areas

* Run Win32 integration tests in pipelines

* Add extra tests and fixes when CanResize=false

* Use WM_GETMINMAXINFO to maximize captionless windows

* Use dotnet run on CI for IntegrationTests.Win32

* Address review
2025-12-06 09:48:58 +00:00