* 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>
* Minimize private API usages
- AvaloniaLocator.Current shouldn't be used unless really needed.
- Add comments where not possible otherwise
* fix wrong if statements
* 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>
* Update Avalonia.Controls.Platform.Dialogs apis
* Enable nullable on dialogs project
* Implement ManagedFileChooserOverwritePrompt with new styles, instead of hardcoding prompt creation
* Add BclMountedVolumeInfoProvider fallback
* Update samples page to include ShowOverwritePrompt
* ManagedStorageProvider with different window and popup implementations
* Extend ManagedFileDialogOptions
* Fix#8437 because I can
---------
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
* Introduce ErrorConverter and DisplayErrors attached properties
- the converter can be used to change the way a message is print
- we use DisplayErrors to get the converted error messages
* Adjust FluentTheme
* [WIP] Add a sample Page for DataValidationErrors
* use a private attached property to store recent errors
this approach gets rid of the need to DisplayErrors property
* Update samples with some additional details
* Reuse rich SetError logic in DataGrid as well
* Unify some code with OnErrorsOrConverterChanged
* Restore old behavior with null default value
* Add SetErrorConverter test
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* feat: add Content and ContentPresenter for ColorPicker
* feat: update according to https://github.com/AvaloniaUI/Avalonia/pull/13073 feedback.
* feat: add HorizontalContentAlignment and VerticalContentAlignment default value to simple theme.
* feat: update documentation wording.
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Add Fluent HeaderContentControl theme
* Fix file name, add content template
* Add simple theme for HeaderedContentControl
* Add sample page for HeaderedContentControl in the catalog
* Change the HeaderedContentControl to use a Grid instead of a stack panel for its layout
* Fix template part names
* Fix HeaderedContentControl typename
* Fix the template part type again
* Fix control template names
* Introduce IFilePickerFileTypes to have more control over file types in the native backend
* Update samples page for dialogs
* Rename to IAvnFilePickerFileTypes
* WIP
* Fix disabled popup
* Explicitly dispose AvnString and AvnStringArray + GetNSArrayOfStringsAndRelease
* Fix potential crash
---------
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>