Commit Graph

27443 Commits

Author SHA1 Message Date
Julien Lebosquain eb80c729d9 Fix NuGet warnings (#20466) 2026-01-14 12:19:15 +00:00
Gehongyan d3642f9871 Fix Avalonia.Desktop.slnf compiling (#20461) 2026-01-13 16:01:17 +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
Julien Lebosquain f07e42d2bb Remove BinaryFormatter (#20455) 2026-01-13 03:49:23 +00:00
Tim 9ab60f262d Fix for HarfBuzz was missing (#20456)
* Fix for HarfBuzz was missing

* Address review
2026-01-12 18:52:48 +00:00
Shirasagi a8e9c4293f fix: remove unnecessary reset of cached scaling when the SurfaceView is destroyed. (#20448) 2026-01-12 16:03:27 +00:00
Emmanuel Hansen c9dabe3c4a android - cancel back callbacks when handled (#20452) 2026-01-12 12:43:19 +00:00
Julien Lebosquain 6faf702e2d Fix Android obsolete warnings (#20412) 2026-01-12 11:28:37 +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
Julien Lebosquain f118f14945 Fix CS1574 warnings (#20429) 2026-01-09 08:09:36 +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
Melissa b0943d9888 Fixed accessibility with screen reader on TextBlock controls with inlines rather than pure text (#20438) 2026-01-08 17:38:35 +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
Steven Kirk abb17229f1 Fix ncrunch configuration. (#20437)
When Avalonia updated to `net10.0` it broke the ncrunch configuration. I re-configured everything from scratch here as now we're not targeting `netstandard2.0` by default we only really need to test our current target framework (`net10.0`).

Also made it so that every project was ignored by default and projects that are needed are whitelisted. This should mean that things don't break when new projects are added that are unrelated to things that will be tested.
2026-01-08 14:50:31 +00:00
Julien Lebosquain d034e5f4e8 Handle added packages in API diff (#20428) 2026-01-07 16:14:05 +00:00
Julien Lebosquain 4b071000a4 Split analyzers and code fixes into separate projects (#20312)
* Split analyzers and code fixes

* Split C# and VB analyzers

* Merge all analyzer packages

* Add Analyzers.VisualBasic to .slnf
2026-01-07 13:22:46 +00:00
Scrub 73814df2b8 Fix ambiguous and dead inheritdoc links (#20397)
* Specifiy explicit interface method when inheritdoc has ambiguous base candidates

* Explicitly write out Dispatcher.Post(Action,DispatcherPriority) documentation

* Move Post(Action,DispatcherPriority) next to Post(SendOrPostCallback,object?,DispatcherPriority) for clarity

* Fix Layoutable.ChildDesiredSizeChanged
Documentation sourced from 0e2cee8810

* Add specific invalidation xml doc to ExperimentalAcrylicMaterial.Invalidated

* Fix typos in FallbackColor xml doc

---------

Co-authored-by: Max Katz <maxkatz6@outlook.com>
2026-01-07 05:20:55 +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
Mike James 4af92dcce2 Update CODE_OF_CONDUCT.md (#20417)
Clarifies acceptable use of project platforms and adds enforcement guidelines for promotional content that derails technical discussion.
2026-01-06 17:07:11 +00:00
kerams 66af66e609 Fix iOS TextInputResponder (#19310)
* Fix iOS TextInputResponder

* Add null validations to TextInputResponder

* Revert
2026-01-06 14:04:12 +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
Yuriy Kopylov 87b35a7c7f Removed obsolete Windows clipboard format CF_TEXT. (#20389) 2026-01-05 11:22:15 +00:00
Julien Lebosquain 3e41310917 Enable nullability in all samples (#20379) 2026-01-05 09:09:27 +00:00
Julien Lebosquain cf5b12e700 Enable nullability in Avalonia.Native (#20378) 2026-01-05 09:09:08 +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
Julien Lebosquain 2a3c9d4095 Update Nuke to v10 (#20345) 2025-12-29 09:24:21 +00:00
Krzysztof Krysiński f74633c574 Added xKbSetDetectableAutoRepeat (#20360) 2025-12-29 09:24:04 +00:00
Max Katz 66d38d897d Update HelpLink for XAML namespace resolution (#20371) 2025-12-29 09:12:50 +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
Youssef Victor f5bab9b85e Update .NET SDK to 10.0.101 (#20322) 2025-12-22 11:34:04 +00:00
Wiesław Šoltés 2bd109c808 Fix System.InvalidOperationException Dispatcher job loop detected (#20310) 2025-12-19 18:20:32 +00:00
Grigorii Vasilchenko 5766c304ea Fixed thread-race condition on shutdown (#20299) 2025-12-19 15:26:52 +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
Emmanuel Hansen 9623669c41 Win32 - export bitmap in more clipboard formats (#20209)
* win32 - export bitmap in more clipboard formats

* addressed review

* use compatible bitmap for ole gdi copy

* change bitmap intent to colormetric

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-12-17 11:36:14 +00:00
Emmanuel Hansen 1ae9694f78 Use androidx lib for backpressed callback (#20291)
* use androidx lib for backpressed callback

* Update API suppressions

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-12-17 01:19:04 +00: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
AlanIWBFT 81165c1ea8 [X11] Clean up IME inconsistencies (#20201)
* [X11] Clean up IME inconsistencies

* Fix where combinations like `GTK_IM_MODULE=none XMODIFIERS=@im=fcitx` can actually enable IME instead of forbid it - this is consistent with `AvaloniaX11Platform.EnableIme()`
* XIM should always be used if none of `IM_MODULE` is set (instead of only when they are explicitly set to `xim`)

* [X11] Try connecting to IMEs specified in `XMODIFIERS=@im=` through D-Bus before falling back to XIM

* [X11] Refine `XMODIFIERS=@im=` parsing

* Only the first one specified will be parsed and accepted
2025-12-16 20:30: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
Krzysztof Krysiński 79be86d923 Added basic Pen support for X11 (#19910)
* Added surface dispose to DrawingSurfaceDemoBase

* Added pen support for x11

* Fixed intermediate points defaulting properties

* Detect the current device being an eraser

* Formatting fixes

* Removed spaces

---------

Co-authored-by: flabbet <flabbet@fedora>
Co-authored-by: Nikita Tsukanov <keks9n@gmail.com>
2025-12-16 10:12:00 +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