Commit Graph

27478 Commits

Author SHA1 Message Date
Julien Lebosquain 92190e6ee1 Improve error message for invalid surface size (#20591) 2026-02-02 21:57:27 +00:00
Thad House 7d9c8eeb7b Fix warnings and index bugs in ControlCatalog sample (#20590) 2026-02-02 20:07:00 +00:00
Daniel Lerch 0715676f22 Raise IAvaloniaActivity.Activated on new intent (#20564)
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
2026-02-02 14:15:27 +00:00
Julien Lebosquain 5483217944 Merge IResourceHost2 into IResourceHost (#20576)
* Merge IResourceHost2 into IResourceHost

* Update API suppressions
2026-01-30 15:32:10 +00:00
Julien Lebosquain 806193a43d Remove NativeMenuItemToggleType and NativeMenuBar.EnableMenuItemClickForwarding (#20577)
* Remove NativeMenuItemToggleType

* Remove NativeMenuBar.EnableMenuItemClickForwarding

* Update API suppressions
2026-01-30 09:57:39 +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
Julien Lebosquain 3394815603 Simplify text formatting constructors (#20527)
* Remove the flowDirection parameter from TextCollapsingProperties.CreateCollapsedRuns

* Simplify text formatting constructors

* Update API suppressions
2026-01-30 09:55:24 +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 f92035b914 Headless: use HarfBuzz by default (#20561) 2026-01-28 13:27:47 +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
Melissa b775804b61 Implemented AutomationProperties.LiveSetting (#20473)
* Implemented LiveSetting property

* Make sure PropertyChanged callback is called on AvnAutomationPeer

* Remove `optional` from `AvnAccessibility`: we were never checking whether they respond to the selector or not anyway

* Formatting

* Use ARIA and Live Region Changed constants from mac APIs

* Fixed Mac build

* Reverted constants that don't exist on integration test XCode version

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2026-01-26 13:48:21 +00:00
kerams 232e2aee39 Fix Android surface recreation (#20538) 2026-01-26 10:49:42 +00:00
Julien Lebosquain d5d7a7b0e8 Merge IGeometryContext and IGeometryContext2 (#20528)
Co-authored-by: Max Katz <maxkatz6@outlook.com>
2026-01-24 15:53:11 +00:00
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