2463 Commits

Author SHA1 Message Date
mmdi 25f57fa41f first moti commit 2026-04-14 03:20:40 +03:30
Nikita Tsukanov ab5f8fca74 Make sure that adorners are actually correctly positioned in visual tree for TransformToVisual and friends (#20691)
* Make sure that adorners are actually correctly positioned in visual tree for TransformToVisual and friends

* Fixes
2026-02-16 14:13:21 +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
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 934ca7c9f5 Release implicit mouse capture on focus lost (#20574)
* macOS: Release implicit mouse capture on focus lost

* Added native modal test to EmbeddingPage
2026-02-04 10:50:15 +00:00
Julien Lebosquain 313bceea90 Remove AutoCompleteBox.BindingEvaluator (#20596)
* Remove AutoCompleteBox.BindingEvaluator

* Fix AutoCompleteBoxPage sample

* Update API suppressions
2026-02-04 03:08:24 +00:00
Thad House babab4f9cb Add screen orientation support for Linux DRM (#20154)
* On Frame-Buffer-Orientation: Add screen orientation support for Linux frame buffer and DRM applications.

This commit introduces support for screen orientation across various components by adding a new `Orientation` property of type `SurfaceOrientation` in `DrmOutputOptions` and `FbDevOutputOptions`. The `IScreenInfoProvider` interface is updated to inherit from `ISurfaceOrientation`, ensuring consistent orientation management.

Key changes include:
- Enhanced `FramebufferToplevelImpl` to handle orientation in size calculations.
- Updated `LibInputBackend` for device input coordinate rotation based on screen orientation.
- Implemented `ISurfaceOrientation` in `DrmOutput` and `FbdevOutput` classes.
- Modified `DrawingContextImpl` to support canvas rotation based on orientation.
- Improved `FramebufferRenderTarget` and `PixelFormatConversionShim` to respect framebuffer orientation during surface creation and pixel format conversions.
- Streamlined rendering methods to ensure drawing operations align with the current surface orientation.
- Removed redundant code related to framebuffer handling.

* Fix review comments, add ability to test

* Some formatting

* Should be working now

* Remove fbdev changes

Theres really no point to do this in fbdev.

* Better method of rotating and transforming the canvas

* Remove breaking changes

* Switch to using a 2nd frame buffer in the rotation case

* Fix review comments

* Incorrect variable

* Fix sample

---------

Co-authored-by: davidw <davidw@icselectronics.co.uk>
2026-02-03 09:01:29 +00:00
Thad House 7d9c8eeb7b Fix warnings and index bugs in ControlCatalog sample (#20590) 2026-02-02 20:07:00 +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 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
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
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 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
Julien Lebosquain 71ce62ae32 Remove legacy Diagnostics project (#20332)
* Remove legacy Diagnostics project

* Remove DataGrid submodule
2026-01-07 01:24:28 +00:00
Julien Lebosquain 3e41310917 Enable nullability in all samples (#20379) 2026-01-05 09:09:27 +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
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
Javier Suárez 7efc6d9bb0 [Feature] Move LetterSpacing to TextElement as inherited attached property (#20141)
* Add LetterSpacing property to the Button

* Created attached property

* Added samples

* Updated implementation

* Updated Themes

* Updated ButtonPage LetterSpacing sample

* Updated templates

* Updated API
2025-12-01 08:50:28 +00:00
Melissa d2817201cb Added LandmarkType to automation properties (#20134)
* Added LandmarkType to automation properties

* Set AutomationProperties.AccessibilityView on Main landmark in IntegrationTestApp, which is required for Narrator to find the landmark

* Implement AXRoleDescription as suggested by W3C

* Fixed wrong role descriptions
2025-11-26 14:49:28 +00:00
Julien Lebosquain 4357a8dafc Use Silk.NET in GpuInterop sample (#20133)
* Replace SharpDX with Silk.NET in GpuInterop sample

* Add Vulkan/D3D11 command line switch to GpuInterop

* Fixed warnings in GpuInterop
2025-11-24 12:23:07 +00:00
Julien Lebosquain 40a3af4aa5 Remove netstandard2.0 from almost all projects (#20111)
* Remove netstandard2.0 from almost all projects

* Fix duplicated target frameworks in unit tests

* Fix DesignerSupport tests

* Fix Designer.HostApp packaging

* Build ControlCatalog.Desktop on CI

* Fix another bad auto merge

* Fix LeakTests duplicated target frameworks

* Don't hardcode target framework in DesignerSupportTests
2025-11-21 09:59:39 +00:00
Max Katz 12741e861b Remove Avalonia.Browser.Blazor (#20105) 2025-11-20 09:57:34 +00:00
Julien Lebosquain 70ebc1e226 Remove ReactiveUI (#20101) 2025-11-19 21:05:12 +00:00
Julien Lebosquain fb0f3848f9 Update to .NET 10 (#19869)
* Update to .NET 10 and C# 14

* Remove reflection usage in AvaloniaAccessHelper

* Fix Android nullability errors

* Fix WindowMetrics.WindowInsets removed from AndroidX

* Update pipelines

* Fix ValidateApiDiff for missing frameworks

* Fix Windows integration tests

* Update Xamarin.AndroidX.Window to 1.5.0

* Fix MacCatalyst supported version

* Remove unused Xunit.Extensions.Ordering

* Try to fix macOS integration tests

* Update pipeline runner to macOS 15

* Disable LeakTests

* Fix .NET Framework unit tests

* Fix BuildTests

* Bump minimum Android API level to 24

* Update to .NET 10 RTM

* Update XamlX

* update android insets and activity code to handle deprecated behaviors in api 36

---------

Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
2025-11-19 15:22:43 +01:00
Emmanuel Hansen 4be786a5f6 Support reading from and copying images to clipboard (#19930)
* support reading images from clipboard(win32/android)

* Add DataFormat.Image. Prioritize png format when retrieving image from clipboard

* add browser support

* addressed comments

* win32 - add support for CF_DIB and CF_BITMAP formats

* win32 - add support for copying bitmaps to clipboard as DIB

* browser - add support for copying bitmap to clipboard

* Implement bitmap clipboard for iOS

* rename DataFormat.Image to DataFormat.Bitmap

* Implement Bitmap clipboard on macOS

* Use MemoryStream for bitmap clipboard/dnd on macOS backend

* Add public.jpeg support on macOS backend (convert it to png while in objc)

* Support TIFF format on iOS backend, by converting it to UIImage first

* Add Bitmap DND sample

* add clipboard bitmap support on linux

* simply bitmap format search on win32 clipboard

* fix linux clipboard image

* Bump MACOSX_DEPLOYMENT_TARGET

* Fix IDL incompatibility

* address review

* more reviews

* Fix Android crash on copy when a bitmap is present in the clipboard

* Handle any error that might occur pasting from an external content provider

* Add data transfer extension methods for Bitmap

---------

Co-authored-by: Max Katz <maxkatz6@outlook.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-11-15 04:35:07 +00:00
Jumar Macato 80223ca7d4 Impl SuggestedFileType for Save/OpenFilePicker (#20026)
* new SuggestedFileType API

* Add impl for Win32 SuggestedFileType

* Impl suggestedFileType for GTK

* DBus impl

* Impl API for mac

* Add sample for suggested file filter

---------

Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
2025-11-13 00:45:42 +00:00
Tom Edwards d500f91121 Enable use of new VS extension with ControlCatalog by compiling XAML files as AvaloniaXaml (#19971)
Removed manual InitializeComponent definitions
Replaced uses of Get, FindControl, etc. with generated fields
2025-11-08 13:42:49 +00:00
Emmanuel Hansen 3ed7b9e9fa Fix/win32 no border sysmenu (#19923)
* remove ws_sysmenu from non full decoration windows

* update decorated window sample to not resize on maximize
2025-10-28 16:08:37 +00:00
Jumar Macato 2c540873ec Add Impl for SaveFilePickerWithResultAsync API (#19783)
* Add new SaveFilePickerWithResultAsync API to the base

* Add SaveFilePickerWithResultAsync stub impl

* Control Catalog SaveFilePickerWithResultAsync sample with XML and JSON types

* Make SaveFilePickerResult a struct

* Add managed picker implementation

* Make SaveFilePickerResult a readonly struct

* Windows implementation of SaveFilePickerWithResultAsync

* Test impl for dbus

* Reuse the file type object (FTO) so StorageFile consumer can match exactly the right FTO when receiving the SaveFilePicker's result.

* Add Gtk impl

* Avalonia.Native: surface selected save dialog filters

* macOS: report selected NSSavePanel filter

* Modify the conditional in case there's duplicate descriptions of FTO's in DBusSystemDialog.cs

* Instantiate FPFT as fallback

* Pass the mime/pattern to instantiated FPFT

* Update API diff

* Fix review comments

---------

Co-authored-by: Max Katz <maxkatz6@outlook.com>
2025-10-27 03:43:09 +00:00
Julien Lebosquain 467063b54b Remove Tizen (#19722)
* Remove Tizen

* Address review
2025-10-06 07:31:20 +00:00
Nikita Tsukanov 22c4c630ce [OSX] Implemented IOSurface/MTLSharedEvent interop APIs (#18791)
* [OSX] Implemented IOSurface/MTLSharedEvent interop APIs

* Bump Xcode?

* Xcode?

* APIDiff

* Use different XCode versions because of how awesome appium is

* A hack for crapium

* Replace SkiaMetalApi usages

* Update API suppressions

---------

Co-authored-by: Timothy Miller <innerlogic4321@gmail.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-10-03 18:46:48 +02:00
Julien Lebosquain 1f404646fa Clipboard rework (#19347)
* New clipboard with IDataTransfer

* Move legacy format handling to DataObject wrappers

* macOS clipboard rework

* Browser clipboard rework

* Android clipboard rework

* iOS new clipboard

* X11 clipboard rework

* Simplify IDataTransfer API

* Simplify IClipboardImpl API

* Add DataFormat documentation

* Make DataFormat.SystemName platform specific

* Fix clipboard/DnD samples

* Fix native clipboard UTI conversion

* Adjust IDataTransfer namespaces

* Add Obsolete attributes to IDataObject related methods

* Better API for DataTransferItem

* Tizen clipboard rework

* Add missing clipboard extension methods

* Split IDataTransferItem into IAsyncDataTransferItem and ISyncDataTransferItem

* Rename back ISyncDataTransfer to IDataTransfer

* Added IClipboard API suppressions

* Make IPlatformDragSource NotClientImplementable

* Rename DataFormatKinds

* Added DataTransferItem.CreateText/File

* Implemented typed DataFormat<T>

* Fix X11 text/uri-list encoding

* Add API suppressions

* Adjust ClipboardUriListHelper stream ownership

* Fix legacy clipboard BinaryFormatter deserialization

* Fix macOS build
2025-10-01 11:47:09 +00:00
Julien Lebosquain d7f417017d Move ControlCatalog.MacCatalyst/tvOS to their own folders (#19709)
* Move ControlCatalog.MacCatalyst/tvOS to their own folders

* Exclude tvOS/MacCatalyst from CI builds
2025-09-30 08:36:46 +00:00
Melissa a8f3628da9 Added HeadingLevel to AutomationProperties (#19696)
* Added HeadingLevel to AutomationProperties

* Added support for HeadlingLevel accessibility on Mac
2025-09-27 11:50:44 +00:00
Dan Walmsley 7f47605256 Add SplitViewPanePlacement settings for Top and Bottom. (#19465)
* add SplitViewPanePlacement settings for Top and Bottom.

* remove duplicated styles.

* add missing transparent fills of lightdismiss area.

* add simple theme support for splitview pane placement top/bottom.
2025-09-15 14:30:39 +00:00
Jan Kučera c3de4bbbe0 Font features in test app (#19493)
Co-authored-by: Jan Kučera <miloush@users.noreply.github.com>
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
2025-08-28 08:33:48 +00:00
robloo 6c33fe192a Update Brush.Parse() to Handle all Color Formats (#19526)
* Add unit test for all color format Brush parsing

* Support parsing all known color formats in Brush.Parse()

* Update property syntax

* Remove unnecessary usings

* Use an actual hex color

* Fix new brush test

* Switch order of brush parsing so known color optimizations are used

* Add more documentation comments to KnownColors

* Fix displayed text in BorderPage

InnerBorderEdge not InnerBorder
2025-08-24 19:46:04 +00:00
Benedikt Stebner a4b9eb3aab Fix overhang calculation (#19013)
* - Adjusts the overhang calculation so it matches what WPF produces
- Fixes baseline alignment for inline controls

* Adjust OverhangTrailing
Add unit test

* Only run overhang unit test on Windows
2025-08-19 08:56:11 +00:00
Vladislav Pozdniakov 4f666f0ba1 Fix macOS thick titlebar mouse event duplication (#19447)
* Added failing test for OSXThickTitleBar single title area click produce double click #19320

* Fixed OSXThickTitleBar title area click duplication and event delays until the event-tracking-loop is completed

* IntegrationTestApp. Move event counter controls to a separate column. Fixes Changing_Size_Should_Not_Change_Position test

* Move pointer tests to Default group to avoid interference

* Try to fix CI crash

* Try disabling test

* Fix CI test. Collection back to Default

* CI fix. Return back empty test.

* CI fix. Minimal bug test

* CI test. Add double click test

* CI fix. Remove double click test.

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-08-15 11:21:01 +00:00
Max Katz fca45c1c16 Migrate AvaloniaNameSourceGenerator to IIncrementalGenerator (#19216)
* Add AnalyzerProject.targets targets

* PrivateAssets on Workspaces.Common

* Migrate AvaloniaNameSourceGenerator to IIncrementalGenerator

* Remove outdated lins in the generator readme

* Add GlobPattern.ToString

* Fix tests

* Formatting

* Redo pipeline, make steps more independent from each other, compilation should be reused between dependency changes

* Split XAML parsing and type resolution into separated steps

* Restore CompilationReferencesComparer usage

* Revert "Restore CompilationReferencesComparer usage"

This reverts commit c51341990b8030bb2594ee66e8819b903383bcc1.

* Split ResolvedNamesProvider pipeline step, process files in parallel

* Add comment

* Switch back to EquatableList

* Add cancellation to the incremenetal source gen

* Rethrow cancellation exception
2025-08-13 20:22:14 +00:00
Jan Kučera 21b5812746 Text API sample app (#19455)
* xml documentatation for paragraph properties

* TextTestApp

* text test files renamed parameter

* glyph ink bounds

* shaped buffer make selected row visible

* text test app force light theme

* text test app distinguish start and end distance marks

---------

Co-authored-by: Jan Kučera <miloush@users.noreply.github.com>
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-08-13 13:33:33 +00:00
Tim Miller eff1c36ea8 Add AllowTapRangeSelection for Calendar (#19367)
* Add AllowTapRangeSelection for Calendar

* Fix spacing

* Let it be true...

* Update CalendarTests.cs
2025-08-13 11:55:29 +00:00
Julien Lebosquain 1f8701a2fc Add Window.CanMinimize/CanMaximize (#18117)
* Add CanMinimize and CanMaximize to Window

* Win32 impl for CanMinimize/CanMaximize

* Add CanResize/CanMinimize/CanMaximize samples to control catalog

* X11 impl for CanMinimize/CanMaximize

* macOS impl for CanMinimize/CanMaximize

* Win32: don't allow restore when the window isn't resizable

* Additional documentation for CanMinimize/CanMaximize

* Add CanMinimize/CanMaximize logic to CaptionButtons

* Use START_COM_ARP_CALL

* Added CanMinimize/CanMaximize integration tests

* Fixed CanMaximize tests on macOS
2025-08-13 08:35:52 +00:00
Julian 105ba1aa42 IsEditable combox box (#18094)
* IsEditable combox box with text bindings

* Update after #18405 api review

* ComboBox tests for IsEditable

* remove unneeded error being throw when combox is editable and doesn't have text binding properties

* Changes after code review

* only do naviagtion check if combo box is editable

* Fix editable ComboBox tab navigation

* combobox code review improvements

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-08-07 09:19:45 +00:00
Tim Miller dd8a2693ea [v12] Enable Mac Catalyst in Avalonia.iOS (#19415)
* [v12] Enable Mac Catalyst in Avalonia.iOS

* Consolidate UIKit ControlCatalog csproj files

* Fix the plist

* Split csproj files again

* Update .gitignore

* Desktop Mode

* Storage

* Add maccatalyst as workload target

* Revert .gitignore
2025-08-07 09:12:15 +00:00
Alexander Marek df1816bde5 #18626 - improved scrolling performance in VirtualizingStackPanel.cs by reducing Measure/Arrange calls since they cause heavy GC pressure on constrained devices (Android, iOS) especially with complex item views (#18646)
Co-authored-by: alexander.marek <alexander.marek@opti-q.com>
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2025-08-04 14:12:02 +00:00
Tim Miller cd05ff88b7 [iOS] Implement Save File Picker Support (#19364)
* [iOS] Implement Save File Picker Support

* Delete folder instead

* Use StorageProviderHelpers

* Use FromBytes to create blank file
2025-08-02 06:11:02 +00:00