* 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
* Implemented IClipboard.TryGetInProcessDataObjectAsync for X11
* [Win32] Implemented TryGetInProcessDataObjectAsync
* Rest of the platforms
* Run `nuke ValidateApiDiff`
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* 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 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
* Added Compositor.CreateCompositionVisualSnapshot API
* Hurr durr api compat in [Unstable] interface
---------
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
* 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
* 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.
* Fix duplicated trimming attributes warning in Markup.Xaml.Loader
* Fix nullability warnings
* Update ImageSharp to 2.1.8
* Removed obsolete attributes on ValueStore
* Ignore CA1815 on private API RenderTargetProperties
* Fix switch expression warnings
* Fix warnings in Vulkan project
* Only include PThread for WasmEnableThreads
* Rename pollfd to PollFd to fix CS8981
* Fix incompatible packages being used in ControlCatalog.Desktop
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Add .NET 8 target to packable projects
* Update test projects
* Update sample projects to target .NET 8
* Update main Avalonia package to target .NET 8 as well
* Remove MSBuildEnableWorkloadResolver hack and some minor change
* Use net8.0 in nuke build as well
* Pin 8.0.0 SDK
* Adjust API validation
* Pin a valid version
* Remove net461 target from Avalonia package
* Remove unused net6.0 target from Avalonia.Designer.HostApp
* Adjust API diff
* Update ControlCatalog.Android.csproj
* Remove MSBuildEnableWorkloadResolver
* Fix Browser issues on .NET 8
* Fix .NET 8 error
* Fix merge conflicts
* Replace explicit TFMs in .csproj files with a centralized registry
* Fix merge conflict
* Fix AvsLegacyWindowsTargetFrameworks and add hacks for the tests
* Update XCode project CommandLineArgument
---------
Co-authored-by: Nikita Tsukanov <keks9n@gmail.com>
* Minimize private API usages
- AvaloniaLocator.Current shouldn't be used unless really needed.
- Add comments where not possible otherwise
* fix wrong if statements
* Implement MacOS.IsTemplateIcon attached property on TrayIcon
* Use MacOS.IsTemplateIcon in the ControlCatalog
* Rename MacOS to MacOSProperties
* Extract IsTemplateIcon to ITrayIconWithIsTemplateImpl
* 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
* 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>
* Add BackgroundSizing enum
* Improve formatting in RoundedRect
* Add the BackgroundSizing property to relevant controls
* Add new GeometryBuilder helper
This is based on new ideas and APIs in both WinUI and WPF
* Support BackgroundSizing in BorderRenderHelper
This also removes the last remnants of dash array support in the internal APIs
* Remove old code in BorderRenderHelper moved to GeometryBuilder
* Move Rectangle shape geometry calculation into GeometryBuilder
* Add RadiusX/Y properties to RectangleGeometry
* Use RectangleGeometry directly in the Rectangle shape
Since RectangleGeometry now supports RadiusX/Y there is no longer a need to have a separate geometry creation path.
* Add WinUI-based CalculateRoundedCornersRectangle() method
* Simplify and use the WinUI-algorithm in BorderRenderHelper
* Update GeometryBuilder.DrawRoundedCornersRectangle() based on WinUI
* Remove obsolete WPF-based CalculateRoundedCornersRectangle method
* Update CalculateRoundedCornersRectangleAlternate
* Update GeometryBuilderTests
* Fix merge
* Remove unused dashed line properties in BorderRenderHelper
These were already removed in master but could not be merged directly because of the new backgroundSizing parameter.
* Optimize CalculateRoundedCornersRectangle
In the worse-case up to three Point structs were created during calculation for each keypoint. Now doubles are used during calculations so the Point is created once at the end.
* Adjust corner radius calculation within custom GeometryBuilder.CalculateRoundedCornersRectangle()
Corner radius is defined at the center of the border stroke rather than the outside edge.
* Simplify code in WinUI's algorithm for CalculateRoundedCornersRectangle()
* Remove extra BorderRenderHelper.RenderCore method
This method does not need to be separate from Render.
* Add more CalculateRoundedCornersRectangle tests and adjust method naming
* Remove custom CalculateRoundedCornersRectangle() algorithm and always use the WinUI one
* Remove some AggressiveInlining attributes
* Make parameters clear
* Pass RoundedRectKeypoints by ref
* Use GeometryCombineMode.Exclude to better calculate border geometries
* Update BorderPage.xaml to include BackgroundSizing API
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Don't overwrite IsClipEnabled.
The user should be able to set this on an adorner themselves.
* Use correct clip bounds for adorners.
Only take the adorned visual's clip bounds into account if the adorner is clipped to these bounds.
* Disable clipping on GridSplitter adorner.
Fixes#10700
* Don't clip adorners in ControlCatalog.
Default setting is `true`, but this was being overridden in `AdornerLayer.AddVisualAdorner`. That was fixed by an earlier commit in this PR, so property needs to be set explicitly to false in ControlCatalog.
* add tv support to form factor
* Resolve comments and add chromium book
* Add some documentation
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>