* Only start ScrollGesture when left click pressed, also `GetCurrentPoint(null)` behaves the same as root visual
* Allow right-click pen to select items on press
* Add context menus to even items on ListBox page for testing
* Avoid global static in UpdateSelectionFromPointerEvent
* Revert "Avoid global static in UpdateSelectionFromPointerEvent"
This reverts commit 2562d73e83.
* Add comment to UpdateSelectionFromPointerEvent
* Use fully mocked rendering for list box test
* Add pen selection tests
* TouchTestHelper should use correct inputs
* Add UniformGrid test cases for scenarios where row/column spacing takes more than available space
* Constrain child size to non-negative when performing arrange in UniformGrid
* 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 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>
* Implemented IClipboard.TryGetInProcessDataObjectAsync for X11
* [Win32] Implemented TryGetInProcessDataObjectAsync
* Rest of the platforms
* Run `nuke ValidateApiDiff`
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* 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
* 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
* Ignore key modifiers on text editing if field is a password field.
It's not secure to rely on password field content when moving. It's should
give no information what so ever.
* Required changes
* Add failing test for TextBlock
* Fix TextBlock re-measure in infinite container
* Fix outdated test
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* fix: #17291 use CustomDateFormatString for parsing the text input
* fix: use CustomDateFormatString also for watermark
* fix: #17291 check also for SelectedDateFormat == Custom
* fix: 17453 don't lose text selection when contextmenu opens on another control
* fix: 17453 don't effect other callers and move the check to FocusChanged method
* Always measure TextBlock with infinite width
* Make sure the constraint is always fulfilled
* Add some tests
* Adjust tests because we no longer retain the TextLayout in the arrange pass
* 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>
* Do not reset the selected range when the TextBox loses focus
Do not render selection highlight when the TextBox doesn't has focus
* Invalidate TextLayout when the focus is lost
* Make ClearSelectionAfterFocusLost optional
Make inactive selection highlight optional
* Make sure changes to ShowSelectionHighlight invalidate the visual and text layout
* Add failing focus tests for flyouts inside overlay popups
* Implement IKeyboardNavigationHandler on OverlayPopupHost
* Layout OverlayPopupHost content for focus to work
* Rework how TextBlock skips redundant measure and arrange calls
Add some tests
* Adjust tests
* Try this
* Make sure the TextBlock is arranged after it has been measured with a different availableSize
* Make it more clear that we are resetting and recreating the TextLayout
* Capture textLayout after inlines have been processed