* Add unit test for sub menu item testing
* Parent menu items should not be disabled on command binding failure.
If a menu has a failed `Command` binding, but also has sub-menu items, then it should not be disabled.
---------
Co-authored-by: Anastassia Pellja <anyka545@gmail.com>
* Add failing tests for SelectedItem/SelectedIndex without an ItemsSource
* Keep SelectedItem/SelectedIndex until ItemsSource is set
* Add failing tests for setting SelectedValue without an ItemsSource
* Keep SelectedValue until ItemsSource is set
* 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>
* Fix issue with MinTextWidth (Fixes#18372)
* Make sure that MeasureOverride for TextPresenter and TextBlock are using same textWidth
* Revert #16601 that is introducing an invalid calculation for the OverhangLeading
Add tests for OverhangLeading and OverhangTrailing
* Revert MinTextWidth
* Fix tests to not rely on fixed values
* Fix remaining issues
* Fix comment in Direct2D1 GlyphRunImpl.cs
* Fix Direct2D1 rendering
* Fix gold images
* Restore TextLineImpl
* Update gold image
* Restore Math.Max on OverhangLeading and Trailing
* Adopt similar behavior to WPF: don't use OverhangLeading/Trailing for measuring and remove clip by default.
But it requires further support with NeedsClipBounds
* Remove MinTextWidth
Keep ClipToBounds=true default for TextBlock
* Revert change
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
* Add an optimized path for notifying property changes for inherited values
Avoids many allocations of event args.
* fix unit tests with hack to prove concept.
* update docs and remove value tuple that could cause allocation.
* add a benchmark for inherited property change notifications.
* 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.
* Implemented IClipboard.TryGetInProcessDataObjectAsync for X11
* [Win32] Implemented TryGetInProcessDataObjectAsync
* Rest of the platforms
* Run `nuke ValidateApiDiff`
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* 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
* Fix XamlTypeExtensionNode not being handled on the x:DataType transformer
* Add testt with complex DataType
* Make vm:MainWindowViewModel+TestItem nested type generic on BindingDemo
* Add spacing properties
* Add spacing while computing final offsets
* Add spacing while calculating desired size
* Add unit tests
* fix missing spacing arrangement
* draw grid line
* Add property changed handler
* add new unit test
* Resolve star spacing
* fix AffectsMeasure
* overflow unit test
* Clean up
---------
Co-authored-by: Poker <poker_sang@outlook.com>
* Modify SelectingItemsControl to not just use unrealized items
* Fixup null deref
* Get unrealized items searched in comboboxes
* Fixup one small comparison bug
* Reset file that shouldn't have been changed
* Try again
* Revert frfr
* Revert frfrfr
* Fixup per PR feedback
* Remove documentation from internal method
* Remove unused usings
* 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>
* Implement AVLN2208 diagnostic - ItemContainerInsideTemplate
* Add AVLN2208 tests
* Enable AVLN2208 as an error in the repository globally
* Fix invalid ListBoxItem inside of DataTemplate in devtools
* complete window dialog task when dialog is hidden
* change window IsVisible behavior for dialogs to hide window instead. update tests
* unset owner before hiding window to prevent OS from updating owner visibility or window order
* Added new test: changing window size should not change position
* Removed unnecessary window placement assignment to fix window position shifting due to incorrect workspace coordinate usage
* Fixed test because buttons went off the window on tiny screen resolutions
* Make test Windows specific
* Use `Bounds` instead of `Width` and `Height` properties as they are "requested" size rather than actual size (see #18060)
* 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>
* Trim text-runs in their logical order
* Revert breaking changes
* Added TODO12 comment
* Added test unit
* Use LogicalTextRunEnumerator
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>