27515 Commits

Author SHA1 Message Date
Julien Lebosquain 3c88142694 Make Screen abstract (#20529) 2026-01-24 09:41:04 +00:00
Dong Bin 01a8042094 Disable scroll chaining for ScrollVIewers in popup. (#20503)
* feat: disable scroll chaining for AutoCompleteBox, ComboBox, and MenuScrollViewer.

* feat: disable scroll chaining for AutoCompleteBox, ComboBox, and MenuFlyoutPresenter

* feat: enable scroll chaining for ScrollViewer in MenuFlyoutPresenter.
2026-01-23 12:03:39 +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 8d2f1475ca Remove IInternalScroller and move IScrollable to Avalonia.Base (#20519)
* Remove IInternalScroller and move IScrollable to Avalonia.Base

* Update API suppressions
2026-01-23 07:26:26 +00:00
lindexi 62fac86360 Reduce the number of WrapDirect3D11Texture calls (#20517)
* Reduce the number of WrapDirect3D11Texture calls

Reduce the number of WrapDirect3D11Texture calls by tying the EglSurface lifetime to _renderTexture.
When testing on a 4K display, I observed that eglCreatePbufferFromClientBuffer, which is invoked by WrapDirect3D11Texture, can take around 5 ms per frame.
By reducing the number of eglCreatePbufferFromClientBuffer calls, I was able to improve rendering performance by about 30%.
However, I’m not sure why the previous implementation needed to call WrapDirect3D11Texture on every frame.

* Remove the commented code
2026-01-22 15:28:46 +00:00
Nikita Tsukanov 8cdb68f6b5 Use net8.0 TFM for shipped build props (#20518) 2026-01-22 15:27:43 +00:00
Matt Lacey cae6ee2234 Fix typo in build.md (#20513)
just a single typo fix
2026-01-21 14:18:56 +00:00
Evan 65adcde081 Fix TimePicker to respect custom Width property (#20507)
* Fix TimePicker to respect Width by removing MinWidth from internal Button

* Add MinWidth to DatePicker for consistency
2026-01-21 10:06:02 +00:00
lindexi 93eeadf3c1 Fix the DxgiRenderTimerLoop thread get the screens from UI thread (#20511)
Fixes https://github.com/AvaloniaUI/Avalonia/issues/20508
2026-01-21 08:32:25 +00:00
Julien Lebosquain 0fb64d65cc Enable warnings as errors (#20504) 2026-01-21 08:16:46 +00:00
Evan 5f3dbae222 Fix DatePicker to respect Width by removing MinWidth from internal Button (#20487)
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-01-20 22:53:29 +00:00
lindexi 3b3a5d2b76 Add thread name in DxgiConnection (#20505)
The thread name in WinUiCompositorConnection is DwmRenderTimerLoop
2026-01-20 14:16:34 +00:00
Julien Lebosquain ac37bd6353 Implement scene delegate for iOS (#20454)
* Implement scene delegate for iOS

* Move OS check to its own method to make analyzer happy
2026-01-20 08:39:27 +00:00
Melissa a2a1663f4b Added automation peer for Expander control (#20475)
* Added `ExpanderAutomationPeer` for `Expander` control

* Use Group/"group" on UIA and NSAccessibilityDisclosureTriangleRole on AX

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-01-19 18:19:42 +00:00
Melissa a77f7adce0 Added property changed event for IToggleProvider (#20486) 2026-01-19 10:32:38 +00:00
Melissa 2bcbbde723 Fixed title bar appearing in content element tree (#20485) 2026-01-19 10:11:15 +00:00
Melissa 80be90dcea Fixed broken accessibility properties in ScrollBar control (#20483)
* Fixed broken accessibility properties in ScrollBar control

* Prefer setting Thumb name in xaml instead

* Fixed broken accessibility propertes in ScrollBar control on Simple theme
2026-01-19 10:09:20 +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 737732861b Do not inherit TextDecorations in popup (#20472) 2026-01-15 11:59:16 +00:00
Julien Lebosquain 942f23274f Remove EnableUnsafeBinaryFormatterSerialization property (#20467) 2026-01-14 12:57:15 +00:00
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