* Implement AvaloniaObject on ResourceProvider
* ColorPaletteResources and ColorPaletteResourcesCollection should inherit ResourceProvider
* Use ResourceProvider in tests too
* Adjust API diff
---------
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
* Make sure wrapper and platform DrawingContext have the same transform after Flush
* Add some tests
* Update Avalonia.RenderTests.WpfCompare.csproj
* Remove comments
* Use test font
* Stop Selection.Clear() when selecting a range to enable multiple consecutive blocks to be selected.
* Reinstated Selection.Clear() when range is true and toggleModifier is false.
When range and toggleModifier are true, consecutive ranges are selected.
Added new unit test.
The typo causes the resources `implicitSharedInstance1` and `implicitSharedInstance2` are both always `AvaloniaProperty.UnsetValue`, where `Assert.Same` passes.
* Add CustomPopupPlacement API
* Add Placement="Custom" support for Flyout, ToolTip and ContextMenu controls as well
* Adjust some API changes
* Add Avalonia.Controls.Primitives.IPopupHost.ConfigurePosition breaking change
* Extract new types into separated files
* Fix build after merge conflict
* Adjust nupkg.xml
* Dispose property subscriptions after popup is closed, avoiding flickering
* Adjust API to be more future proof and add new parameters.
* Add new ContextRequestedEventArgs overload while I am on it
* test: Check that the button should not fire the click event on the space key when it is not active
* fix: Button should not fire the click event on the space key when it is not active
* fix: Address review
* Basic failing unit test for UWP/WinUI XYFocus search boundary scenario.
* Change IsAllowedXYNavigationMode to return false if keyDeviceType is null and modes == disabled.
* Add helper function to find the closest InputElement to the target element whose parent does not allow XYFocus rather than always searching from the TopLevel. This restricts focus searches within a specific subtree rather than allowing searches to bridge subtrees that share an XYFocus disabled parent.
* Update BindingBase.Instance signature.
- Swap `target` and `targetProperty` order to make it consistent with other similar methods
- Make `targetProperty` nullable as it will need to be null for `MultiBinding`
* IBinding2.Instance needs to accept a null target property.
It will need to be null for `MultiBinding`.
* Attach needs to accept a null target property.
It will need to be null for `MultiBinding`.
* Initial implementation of MultiBindingExpression.
* Fix failing template binding test.
Only publish unset value if we've already published a value.
* Enabled nullability annotations.
* Added passing test for #16084.
* Remove obsolete API usages.
* Bind to Tag not Text.
Prevents test passing when it shouldn't. See https://github.com/AvaloniaUI/Avalonia/pull/16219#discussion_r1665466968
* Handle DoNothing in MultiBindingExpression.
* Added embedding page to IntegrationTestApp.
Currently embeds a lone native text box, and only when running on Windows.
* Win32 automation support for native control host.
Allows native controls to appear in the Avalonia automation tree as a child of the `NativeControlHost`. They also appear in the _wrong_ place - as a direct child of the `Window` - but this appears to be expected behavior as it happens when hosting a win32 control in WPF as well.
* Basic native control integration test on win32.
* Test editing native win32 control in popup.
* Add embedded text box on macOS.
* macOS automation support for native control host.
Implements special-casing of `InteropAutomationPeer`on macOS.
* Make native control integration test work on macOS.
The test for the native control in a popup is disabled on macOS because we have a bug there.
* Add missing parts
* Fix build error
* Skip test to see if CI passes again.
* Log more info about integration tests on win32.
* Try to fix flaky test.
* The tests won't yet work on macOS yet.
Will require #16577.
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Fixed overlay popups not automatically closing
* Fix overlay tooltip tests not actually generating overlay tooltips
Verify popup type whenever we verify that the popup is open
* Fixed overlay tooltips not being attached to the visual tree in tests
* Record video for failing win32 integration tests.
* Be more specific when selecting the test dll.
https://github.com/microsoft/vstest/issues/3939
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Refactor IntegrationTestApp.
Use a `ListBox` to switch pages instead of a `TabControl`: the `TabControl` didn't adapt well to smaller screen sizes, and the `MainWindow` was getting unwieldy anyway.
* Update tests to use new pager.
Move logic for selecting the page to a base class as we may need to handle scrolling manually on macOS at some point (Appium on macOS doesn't scroll elements into view automatically).
* Add AutomationPeer.IsOffscreen.
This is needed in order for controls to be scrolled into view using WinAppDriver. The default is the same as WPF and the default value is overridden in the same controls as WPF (where present).
* Change namespace to prevent conflicts.
The `DataGrid` in the namespace name was hiding the `DataGrid` type.
* Initial impl of bindable DataGridRow.IsSelected.
* Make DataGridRow.IsSelected two-way bindable.
* [Text] fix infinite loop hang on selection of bidi text
* Deal with zero width whitespaces during run bounds calculation
* Do the same thing for RTL
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
When opening a context menu and pressing the "arrow down" key, the first menu item was not selected. This issue was introduced by #11287. The fix is to make the `ContextMenu` focusable.
Added an integration test to try to prevent regressions.
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Set isDirectory:true explicitly to help [NSURL fileURLWithPath] method
Might solve some rare/random issues with initial directory not being applied
* Fix dialogs page incorrectly setting parent folder
* Move SecurityScopedStream out of iOS project and share it with macOS project
* Refactor BclStorageItem to be more reusable across platforms
* [Breaking] Set BclStorageItem.CanBookmark to false, as it never was supposed to be true. Plain BCL doesn't provide files bookmarking.
* Reimplement storage provider support on macOS, support (optional) sandboxing
* Fix build
* Fix AppSandboxEnabled=false usage
* Re-enable BCL bookmarks, keep them base64
* Fix nullable error
* Prefix all bookmarks with a platform key
* Fix devtools breaking sandboxed app
* Try to read errors after saving bookmark
* Don't crash sample app if has no access
* Add internal IStorageItemWithFileSystemInfo abstraction
* Log information if OpenSecurityScope returned false
* Fix build
* Prefix bookmarks with "ava.v1."
* Support opening old-style bookmarks to avoid breaking changes
* Fix NUnit test context not being properly set
* Add failing tests
* Capture ExecutionContext to keep async locals
* Remove explicit EstablishExecutionEnvironment call, as it was a bad idea
* Make ExecutionContext usage disabled by default, and only enabled for NUnit
* Draft new API
* Push reusable ScreensBaseImpl implementation
* Fix tests and stubs
* Update ScreensPage sample to work on mobile + show new APIs
* Reimplement Windows ScreensImpl, reuse existing screens in other places of backend, use Microsoft.Windows.CsWin32 for interop
* Make X11 project buildable, don't utilize new APIs yet
* Reimplement macOS Screens API, differenciate screens by CGDirectDisplayID
* Fix build
* Adjust breaking changes file (none affect users)
* Fix missing macOS Screen.DisplayName
* Add more tests + fix screen removal
* Add screens integration tests
* Use hash set with comparer when removing screens
* Make screenimpl safer on macOS as per review
* Replace UnmanagedCallersOnly usage with source generated EnumDisplayMonitors
* Remove unused dllimport
* Only implement GetHashCode and Equals on PlatformScreen subclass, without changing base Screen
* Add accessibility ID to the TrayPopupRoot on Windows
* [Windows] Add left click and menu item click e2e tests for TrayIcon
* [Windows] Add TrayIcon visibility toggle tests
* Implement macOS tray icon tests
* Make it easier to read tray icon logs
* Try to handle win10 accessibility names
* Try to upload PageSource
* Set condition: always
* Hopefully, it works on CI
* Try to upload PageSource #2
* Fix win10, hopefully for the last time
* Add a failing test for #15712.
* Validate StartU at the start of a measure pass.
If any container U size has changed since the last layout pass then `StartU` must be considered unstable as the average container height will have changed.
* Correctly position focused element.
If the focused element has been moved outside the visible viewport due to a realized container size change, then we need to ensure it's positioned correctly.
* We can skip check if StartU is already unstable.
* Don't invalidate virt. panels more than necessary.
* Add another virt panel test.
And revert the expected results for another test to the way they were at the beginning of this PR.
* Tweak container size estimation.
Use the desired size of _measured_ containers instead of the bounds: a layout pass may not had completed on the containers yet, so the bounds may not be up-to-date. Was easier to move the estimation methods out of `RealizedStackElements` and into `VirtualizingStackPanel` itself in order to do this, and arguably makes more sense.
* Adds seconds support to TimePicker.
* Updates TimePicker to support UseSeconds. Seconds are not displayed unless UseSeconds == true.
* Fixes & updates Unit Tests related to adding Seconds & UseSeconds to TimePicker.
* Adds a simple TimePicker with seconds enabled to DateTimePickerPage.xaml.
* Enable IncludeAvaloniaGenerators on integartion tests app
* Implement basic TitleBarAutomationPeer
* Add WindowDecorationsTests (windows only for now)
* Implement window decoration tests on macOS
* Fix build on appium 1
* Fix some windows tests
* Extract WindowDecorationsTests into a separated collection, so it won't conflict
* Fix build
* Fix build
* ensure owner topmost flag is set if its topmost when showing a owned window
* add comments on why HWND_TOPMOST is set again
* add Topmost with owned window integration tests
* fix tests