* 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>
* 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
* Fix ClassBindingManager property dictionary insert
* Prepend ClassPropertyPrefix to key when inserting into registered properties dictionary to be consistent with lookup.
* Added ClassBindingManager unit tests
* 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
* Capture ExecutionContext for Dispatcher.InvokeAsync
(cherry picked from commit e41c9272ac45afc31007a8fe26f9f56291b063ef)
* Implement CulturePreservingExecutionContext
* Add IsFlowSuppressed checking
* Add NET6_0_OR_GREATER because only the Restore need it.
* Use `ExecutionContext.Run` instead of `ExecutionContext.Restore`.
* Pass this to avoid lambda capture.
* Use ExecutionContext directly on NET6_0_OR_GREATER
* on NET6_0_OR_GREATER, use Restore so we can get a simple stack trace.
* Add unit tests.
* All test code must run inside Task.Run to avoid interfering with the test
* First, test Task.Run to ensure that the preceding validation always passes, serving as a baseline for the subsequent Invoke/InvokeAsync tests.
This way, if a later test fails, we have the .NET framework's baseline behavior for reference.
* update mouse test to better simulate clicks on captured controls
* add tap failing test
* use captured element if available as source for tap gestures
* implement pre events for focus change
* add cancelling api to focus change
* add overload for SetFocusedElement
* add focus redirection
* update with api change requests
* fix height queries not matching when container name is set, remove unused query grammer
* add unit test for height container queries with name
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Update ncrunch config.
* Fix test naming.
* Add BindingExpressionGrammar tests.
We only had tests for the error states, and that was named incorrectly.
* Parse null-conditionals in bindings.
* Initial impl of null conditionals in binding path.
Fixes#17029.
* Ensure that nothing is logged.
* Make "?." work when binding to methods.
* Don't add a new public API.
And add a comment reminding us to make this class internal for 12.0.
* Use existing method.
* search for visual parents when hittesting
* Add unit test for hit testing on disabled visual
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Improve ToString() output in case when Key is set to Key.None
* Update KeyGesture.Parse method to support only modifiers combinations
* Update tests with empty combination and modifiers-only combinations
* Send dispose command for CompositionTarget as an OOB batch
* Make Close_Should_Remove_PointerOver to provide some render interface stub
* why ins't reactive stuff using our headless testing?
* fix?
---------
Co-authored-by: Dan Walmsley <dan@walms.co.uk>
* Fix SlicedStream.Seek(offset, SeekOrigin.End)
This fixes https://github.com/AvaloniaUI/Avalonia/issues/13604
The offset _from is applied in set_Position, so applying it also in Seek mispositions the stream. ZipArchive exposes the problem by seeking to the end to read the table of contents.
* Add tests for SlicedStream
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Added FormattedTextSource->GetTextRun failing test
* Ensure that TextLayout-TextRuns are correctly generated from the passed TextStyleOverrides using the FormattedTextSource->GetTextRun method.
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
* Add failing Path Geometry update test
#4748 [BUG] Rerender on change for Paths, Segments and e.g.
Failing Test
* Fixes failing Path Geometry update test
Fixes#4748 [BUG] Rerender on change for Paths, Segments and e.g.
* Give AvaloniaDictionary new .ctor and add Tests for it
#17311
* AvaloniaDictionary accept IDictionary as init collection
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Add failing tests for OneTime and null data context bindings
* Made OneTime bindings update on DataContext changes
Also allows null as a valid value for bindings without path
* Remove now obsolete test
* Fix BiDi algorithm and tests
* More adjustments
* Add EastAsianWidth trie and class
* Start implementing Unicode v15.1 Standard Annex #14
* Update Unicode data to V15.1 and initial Unicode® Standard Annex #14 implementation
* Some adjustments
* More fixes
* 543 to go
* 273 to go
* Almost done
* Finish up line breaker
* Some adjustments
* Tokenizer returns a ReadOnly Span instead of a string.
* Returning the old property for no API break changes
---------
Co-authored-by: Meloman19 <23280622+Meloman19@users.noreply.github.com>
* add unit tests to show that the EffectiveViewPortChanged event is not being raised when it should.
note: this tests are verified against UWP behavior.
* fix raising of EffectiveViewPortChanged event.
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* fix accelerator behavior for menu items and labels
* add elements with matching accelerator to test cycling in sub menus
* Add AccessKeyHandler tests for accelerators with more than one match
* Implement accelerator behavior based on WPF handling
* Remove commented code
* Remove OnAccessKey override => handled by DefaultMenuInteractionHandler
* remove obsolete test
* handle OnAccessKeyPressed for selected tab item
* fix unit tests
* use AccessKeyEvent instead of AccessKeyPressedEvent in unit tests
* navigate menu with and without ALT key
* Revert formatting changes in Tests
* Fix AccessKeyHandler comments
* move private types to bottom
* Remove lock statements, optimize removal of AccessKeyRegistrations
* remove call to Dispatcher.UIThread.Post
* simplifiy AccessKeyHandler.SortByHierarchy
* remove unnecessary method AccessKeyHandler.GetTargetsForSender
* regenerate API suppression file
* revert unneeded changes in MenuPage.axaml
* correct formatting changes
* do not sort by hierarchy if too few targets
* make AccessKeyEventArgs internal
* make AccessKeyPressedEventArgs internal
---------
Co-authored-by: Hans Docsek <hans.docsek@gmail.com>
* Fix InlineDictionary Behavior for Single Item Reassignment
Previous Behavior:
- When the `Set` method was called, it ignored the `overwrite` parameter if the dictionary contained only one item.
- This caused the `Set` method to behave like the `Add` method, leading to unexpected behavior in composition animations.
- Specifically, the second composition animation would not play because it could not replace the first animation. Instead, it was added after the first animation, preventing it from being executed.
Updated Behavior:
- The `InlineDictionary` now respects the `overwrite` parameter even when it contains only one item.
- This ensures that the second composition animation can overwrite the first one, allowing it to play correctly.
* Append unit test for InlineDictionary
* keep the `(TKey)_data` in a variable and reuse it below line 90 so we avoid a double cast
* Rename the test method
* Remove the unnecessary assignment code.
* removed duplicated code between Window.Show and Window.ShowDialog
* Handling different cases of window initial position and size + unit test
* positioning cursor on resize grip in WindowOrder_Modal_Dialog_Stays_InFront_Of_Parent_When_Clicking_Resize_Grip test
* Fix for flaky test
* displaying decimal digits of slider value to avoid some issues with rounding
---------
Co-authored-by: Herman Kirshin <herman.kirshin@jetbrains.com>