* Adjust TextLineImpl.GetTextRunBounds so it properly handles substitutions
Adjust TextLineImpl.GetTextRunBounds so it properly reports out of text range bounds
Adjust TextLineImpl.GetTextRunBounds so it properly reports text source run indices
* Remove redundant comments
* Add requested changes
* Added unit test for AutoCompleteBox DataValidationErrors
- checks that when the TextBox control's Errors are bound to the parent AutoCompleteBox, they get updated correctly in both parent AutoCompleteBox control and TextBox control
* Fix issue with DataValidationErrors causing issues with AutoCompleteBox because of Bindings
- when binding a control's DataValidationErrors.Errors property to the same property of another control, the use of a static bool flag "s_overridingErrors" was preventing the control with the Binding from being updated correctly
- issue is resolved by replacing static bool flag with a private AttachedProperty<bool> in DataValidationErrors.cs
* Clean up Asserts in previous AutoCompleteBoxTests.cs changes
* 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.
This prevents exception that is thrown in Layoutable.MeasureCore if 0 is set to ColumnSpan (for example by calling Grid.SetColumnSpan). In WPF, the ColumnSpan property immediatelly throws ArgumentOfOutRange exception when 0 is set to ColumSpan.
* Use AndroidViewControlHandle for android toplevel handle
* Use UIViewControlHandle for iOS toplevel handle
* Use JSObjectControlHandle for browser toplevel handle
* Revert NativeControlHostImpl changes