Added ITextScaler to support custom text scaling
Calculate a font scale factor and use this to adjust height and spacing values
Fixed TextBox not updating when LineHeight changes and MaxLines or MinLines are active
Fixed TextBox.MaxLines and TextBox.MinLines calculations when text scaling is active
Fixed TextBox not updating when LineSpacing changes
Removed EffectiveFontSize, since it's no longer the only property which scales
* Handle Datavalidations on base class "Control"
this removes the need to override it in any sub-classing control and also allowes developers to add validation support for other properties / controls by overriding Metadata
* Revert changes on Button.
The current behavior is that button gets disabled and until we decide if this is desired, keep this behavior.
* 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
* 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
* [Android] fix a bug which cause closing soft keyboard does not clear focus on TextBox, which makes clicking on the TextBox cannot call out the soft keyboard again
* change way to show soft keyboard
* add new api
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
If the password text is revealed, the pre-existing word-based selection model remains (the closest word to the pointer position is selected.)
Related to https://github.com/AvaloniaUI/Avalonia/issues/14956
* feat(NumericUpDown): Add InnerContent. It is positioned on the opposite side to ButtonSpinnerLocation
* fix: TextBox Nullability
* fix: Adress review
* fix: nits
* fix: missing update ControlCatalog
* Discard additional lines upon inserting when AcceptReturn=false
* Use LineBreakEnumerator for detecting line breaks
* Remove unused member
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Use Grapheme enumerator
---------
Co-authored-by: Markus <markus@mlet.at>
Co-authored-by: Max Katz <maxkatz6@outlook.com>
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
* Init
* Remove XY navigation cache as it's no use
* Use pooled collection for XY navigation
* Restructure code a bit, fix IScroller handling
* Init KeyboardNavigationTests_XY tests
* Simplify XYFocus.GetNextFocusableElement usage
* Minor fixes
* Add more tests
* Remove unused NuiKeyboardNavigationHandler
* Finalizing
* Fix tests
* Add TODO12
* Make XYFocusOptions a class
* Add TestServices.FocusableWindow and make KeyboardNavigationHandler lazy, as it can't be reused on multiple windows
* Fix KeyboardNavigationHandler events handling, when focus was not actually changed
* Add arrow key tests
* Replace XYFocusKeyboardNavigationMode with more flexible XYFocusNavigationModes, integrate with KeyDeviceType input types
* Make XY focus navigation less broken, when there is no starting focused control
* Several Android TV compatibility improvements
* Remap tizen Back button to Esc
* Introduce internal XYFocusHelpers
* Make ComboBox and AutoCompleteBox handle Key events only when it's needed
* Make TextBox handle Key events only when it's needed
* Ignore Alt+Down when XY navigation is enabled in CalendarDatePicker and SplitButton
* Rename IsAllowedXYNavigationMode
* Fix ButtonSpinner with XY navigation
* Implement a very simple focus engagement for GridSplitter and Slider
* Ability to configure font features
* Minor adjustments
---------
Co-authored-by: Herman Kirshin <herman.kirshin@jetbrains.com>
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
* Added CaretBlinkInterval to TextPresenter
* TextPresenter CaretBlinkInterval property exposed through TextBox
* Added PropertyChanged handler for CaretBlinkInterval
* CaretBlinkInterval datatype changed from int to TimeSpan
* Added CaretBlinkInterval comments
* TextBox.CaretBlinkInterval comment changed to inherit from TextPresenter.CaretBlinkInterval
* AddOwner given to CaretBlinkInterval in TextPresenter
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
* add text selection handles
* only show selectors on pen and touch input
* show mobile themed context menu on mobile
* cleanup and track textbox layout changes with EffectiveViewportChanged
* make SelectionHandleType as clr property
* fix custom flyouts not showing with selection handles
* simplify text context menu for mobile.
* cleanup
* address review, simplify styles, add docs
* remove unused resource
* remove unused event handler, reformat selection canvas class
* prevent thumb positions from swapping
* adjust caret position when touch pointer moves
* cleanup, disable scrolling in textbox when intent is selection
* add hold size to platform settings, reduce hold size
* use class handler for control hold event
* improve holding interaction with textbox
* remove GetHoldSize method
* inprove touch input pointer over detection
* improve hold support in textbox
* fix tests
* remove selection updates on hold
* make pointer event args for holding event internal
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>