* 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>
* Add an event so that users can detect when an Application icon is clicked.
* refactor to use Lifetime apis.
* use ActivationKind instead of reason to be consistent with other xaml platforms
* implement macos raise url events.
* add docs.
* add apis to programatically Activate and Deactivate the application.
This allows the dock icon to be kept in sync so its menu options there say "Hide" / "Show" correctly.
* fix api naming.
* Add Browser IActivatableApplicationLifetime impl
* Implement IActivatableApplicationLifetime on Android
* Add IActivatableApplicationLifetime iOS implementation
* Adjust android impl a little
---------
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>