* 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>
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>
* 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
* 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.
* Added DrawingImage.Frame: a rectangular region of `Drawing`, in device independent pixels, to display when rendering the image
* Renamed Frame to Viewbox
Added test
* 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
* Enable nullability in UnitTests
* Enable nullability in Base.UnitTests
* Enable nullability in Markup.UnitTests
* Enable nullability in Markup.Xaml.UnitTests
* 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>
* Add NumericUpDown NumberFormat failing test
* Force text update when NumberFormat has changed
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* 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
* 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>
* 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>
* 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
* 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
* 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
* Implement layout rounding for child sizes
Added layout rounding for child measurements in UniformGrid.
* Remove comment on child measurement in UniformGrid
Removed comment about measuring children in UniformGrid.
* Improved layout rounding logic for UniformGrid
* Grid_Ensures_Consistent_Cell_Width_When_UseLayoutRounding
* Fixed invalid renering of controls with non-zero bounds position.
Fixed text clipping of text elements inside LayoutTransformControl.
* Fixed rendering of VisualBrush.
* Fixed control clipping.
* Fixed opacity mask state.
* Reworked to skip rendering of elements out of clip.
* Code cleanup.
* Added unit test.
* Parameters order.
---------
Co-authored-by: PleshakovDV <pleshakovdv@ugpa.ru>
* Support Design.PreviewWith for any previewing content
* ApplyDesignModeProperties should use bindings
* Add support for IDataTemplate PreviewWith
* Add new members as agreed on API review
* ApplyDesignModeProperties probably should be privateapi
* Add xml comments
* Extract Design.CreatePreviewWithControl and move it out of DesignerSupport project
* Several fixes, add tets
* Update API diff
* wip
* Add DesignModeTests, move relevant tests to this class
* Restore methods accepting control, add IStyle target overload
* Restore Design.SetPreviewWith(AvaloniaObject, Control)
* `SetPreviewWith(any, Control? control)` should accept nullable control
* Add `SetDataContext(IDataTemplate control, object? value)`
* Better Obsolete message
* Added unit tests for ReversibleStackPanel (#20171)
* Invalidates_Arrange_On_Reverse_Order_Change fails.
* Fixed ReversibleStackPanel not invalidating arrange on ReverseOrder change (#20171)
* Add failing test for preserving run formatting during selection
* Fix selection styling to preserve original text formatting in SelectableTextBlock
* fix: apply old logic when `_textRuns` is null
* Improve FontCollection user story
* Make adjustments after review
* Refactor IsFontFile
* Make FontFamilyLoader internal
Make tests happy again
* Update baseline
* Adjust modifier
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* 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
* Fixed the issue where a newline character required two backspaces to be deleted in Windows.
* add unit test
* Handling the differences between HeadlessTextShaperStub and TextShaperImpl
* Make unit tests available
* Treat "\r\n" as a single unit.
* The backspace test against CRLF
* Backspace should treat CRLF as a unit.
* Fixed Selector.ValidateNestingSelector not calling overrides when iterating up through parent selectors
Changed ValidateNestingSelector to call recursively, walking up
the hierarchy of parent selectors. This means function overrides
are taken into account when walking up the tree. Now if a
selector has an OrSelector as its parent, it doesn't throw an
exception.
* Updated ToString methods to surround OrSelectors with parenthesis where useful