* 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
* Implemented GLib-based dispatcher
This should allow running Avalonia on the same thread as another UI toolkit that supports running on top of GRunLoop (e. g. GTK)
* Force-drain the X11 event queue, since g_runloop_quit won't exit the loop otherwise
#Conflicts:
# src/Avalonia.X11/X11Platform.cs
* Set TimePickerPresenter.Time seconds component to zero when UseSeconds is false
* Remove unneeded PART_FirstSpace annotation from TimePickerPresenter
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Only check MainWindow visiblity in DoShutdown cancellation, when ShutdownMode == ShutdownMode.OnMainWindowClose
* Raise WindowClosedEvent event AFTER IsVisible/_shown properties were updated
* Add OnMainWindowClose cancellation tests
* Assert that Closing event was actually raised.
* Re-do fix by forcing window closing
* Forced .Shutdown() should also raise Window.Closed events, and not ignore them
* Always Return 0 bidi level for TextEndOfLine run
* Fix test unit
* Expand the unit test
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* ComboBox empty selection should not generate a TextBlock as SelectionBoxItem
Fixes: #16747
* Add test for ComboBox DisplayMemberBinding behavior without selection.
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* test: Check that `SplitButton.Click` is not fired when `SplitButton` is not in focused
* fix: `SplitButton.Click` is not fired when `SplitButton` is not in focused
* fix: Address review
* fix: Address review
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* test(SplitViewTests.cs): added failing test for issue #17176
* fix(SplitView.cs): added pane state pseudo class update in OnApplyTemplate
- fixed#17176
* test(SplitViewTests): added globalclock mock to failing test
* Show Avalonia context menu and toolip...
In native text box in integration test app. Only implemented for win32 right now.
This is to test the two popup behaviors required for native controls:
- The context menu needs focus to be transferred to Avalonia
- The ToolTip must not transfer focus to Avalonia
* Added Popup.TakesFocusFromNativeControl.
By default, if a popup is shown when a native control is focused, focus is transferred back to Avalonia in order for the popup to receive input. If this property is set to false, then the shown popup will not receive input until it receives an interaction which explicitly focuses the popup, such as a mouse click.
The effect of this property can be seen in the Embedding tag of the IntegrationTestApp: hovering over the native text box shows an Avalonia `ToolTip` which does not steal focus from the native text box. Right-clicking to open an Avalonia `ContextMenu` does steal focus so the menu items can be selected using the arrow keys.
Currently only implemented on a win32.
* Show tooltip and context menu on macOS.
* Implement TakeFocus on macOS.
* Add integration tests.
Only tested on win32 so far.
* Integration tests won't work on macOS.
As can be expected at this point, really.
* Update API diff.
* Fix HeadlessWindowImpl.Position does not persist new value
* Create unit-test for 17071 fix
* Fix CI errors
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Add failing test for #16746
* Always read the value from the target object.
The value must be read from the target object instead of using the value from the event because the value may have changed again between the time the event was raised and now: if that occurs in a two-way binding then we end up with a stack overflow.
* Add attribute
* Replace `SetLastError = true` with `Marshal.GetLastSystemError()`
* Make Avalonia.Base and Avalonia.Skia compatible with DisableRuntimeMarshalling
* First step in Android DisableRuntimeMarshalling support
* Make Avalonia.Browser compatible
* Set EnableRuntimeMarshalling=true on all projects we are not yet ready to support without runtime marshalling
* Added failing AutoCompleteBox test.
* Make sure that flags are reset if exits early.
Wrap everything in a `try`...`finally` block so that they get reset even on exception.
* fix Automation.HelpText on windows
* fix AutomationProperties.HelpText on macos
* change breaking abstract to virtual
* only fall back to tooltip if string
* remove duplicate override
* fix AutomationProperties.HelpText on macos
* Use scalable rasterization for visual brush
* Make ConfigureSceneBrushContentWithPicture less byzantine
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
The `AvaloniaNative.GlPlatformSurface.CreateGlRenderTarget` method can only be called on the UI thread. In normal circumstances this method is called in response to a call to `TopLevel.HandlePaint` from the native `AvnView.updateLayer` method. However, a customer was experiencing a problem where `AvnView.updateLayer` and by extension `TopLevel.HandlePaint` were being called before the window is shown. This broke the creation of the GL render target.
* Enable VisualBrush to be used as Visual's OpacityMask
* Add missing test file
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
* fix Automation.HelpText on windows
* change breaking abstract to virtual
* only fall back to tooltip if string
* remove duplicate override
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>