2463 Commits

Author SHA1 Message Date
Max Katz 37d30dcbc2 AppleTV support + improvements for iOS backend (#14196)
* Add initial metal support for iOS

* Make iOS backend compilable with TVOS and MacCatalyst

* Enable nullable and fix almost all warnings in iOS project

* Implement keyboard and remote (+touch) input on iOS and tvOS

* Disable Metal for now

* Fix warning

* Add tvOS target for Avalonia.iOS

* Include tvos workloads

* Don't use WebKit on tvOS samples

* Extend StandardRuntimePlatform with more apple platforms

* Handle mouse and stylus for iOS backend as well

* And IntermediatePoints

* Fix compatibility warnings

* Respect t.MaximumPossibleForce

* Make ControlCatalog.IOS work with both iOS and tvOS

* Exclude compiled files using csproj instead of #if directives

* Make Metal rendering actually usable

* No need for buffer.WaitUntilCompleted on iOS here
2024-01-21 04:06:05 -05:00
Max Katz c391117795 Remove "netcoreapp2.0" target from the Avalonia. Make previewer use netstandard2.0 (#14268)
* Remove "netcoreapp2.0" target from the Avalonia. Make previewer use netstandard2.0

* Update ApiDiff redirects
2024-01-19 07:07:57 +00:00
Steven Kirk eddd7df395 Fix Adorner Layer Clipping (#13921)
* 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.
2024-01-16 21:27:05 -08:00
Omid Mafakher a6918116bd Add tv support to form factor (#14194)
* add tv support to form factor

* Resolve comments and add chromium book

* Add some documentation

---------

Co-authored-by: Max Katz <maxkatz6@outlook.com>
2024-01-14 20:57:35 -08:00
Dan Walmsley 0e014f9cb6 Add an event so that users can detect when an Application icon is clicked (#14106)
* 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>
2024-01-10 00:06:07 -08:00
Vladimir Drobyshev d44bd39f07 Fix colorAttachment cleaning in the GpuInterop Vulkan demo (#13923) 2023-12-12 23:18:40 +00:00
Emmanuel Hansen 6d9780c5b2 Add Platform InputPane interface (#13363)
* android - remove keyboard size from safe area padding

* add software keyboard listener

* change keyboard height to keyboard rect

* rename height members in software keyboard listener to bounds

* fix docs

* update api

* update toplevel input pane propety name

* remove redundant attribute from input pane interface

* Add iOS implementation

* Fix iOS event

* Change iOS easing functions

* Update demo

* Make StartRect nullable as it's not available on every platform

* Windows IInputPane implementation

* Implement browser input pane

* Minor fixes

* Apply suggestions from code review

Co-authored-by: workgroupengineering <workgroupengineering@users.noreply.github.com>

* Update src/Windows/Avalonia.Win32/Input/WindowsInputPane.cs

Co-authored-by: workgroupengineering <workgroupengineering@users.noreply.github.com>

* Dispose InputPane just in case

* Fix build error, replace ref with in

* Fix relative keyboard geometrychange on browser

* Fix compile error because of the wrong style

---------

Co-authored-by: Max Katz <maxkatz6@outlook.com>
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
Co-authored-by: workgroupengineering <workgroupengineering@users.noreply.github.com>
2023-11-29 15:38:10 +00:00
Julien Lebosquain 08773a9642 Update Xamarin.AndroidX (#13708) 2023-11-23 17:41:48 +00:00
Julien Lebosquain 3fa13d3b64 Warning cleanup 2 (#13696) 2023-11-23 10:42:27 +00:00
workgroupengineering 2852c149e8 feat(PinchGestureRecognizer): Report Pinch angle in degrees (#13244)
* feat(PinchGestureRecognizer): Report Pinch angle in degrees

* fix: Address review

* fix: Angle calculation

* fix: Prevent Gesture Recognition from other Recognition

* feat: Add Sample

* fix: make GetDistance static

* feat(PinchGestureRecognizer): AngleDelta
2023-11-23 08:30:03 +00:00
Julien Lebosquain 8734d9d86e Ignore strong naming warnings in tests and samples (#13700) 2023-11-23 07:12:40 +00:00
Julien Lebosquain 0a26404268 Fix WasmExtraFilesToDeploy on non-Windows .NET 8 (#13698) 2023-11-22 23:04:13 +00:00
Max Katz 1a798ff44c Window-less Managed File Dialog (#13683)
* 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>
2023-11-22 06:55:36 +00:00
Max Katz d307c339d4 Revert _Imports.razor 2023-11-21 16:32:34 -05:00
Max Katz 3df092f714 Impl auto safe area padding (#13047)
* Make iOS safe area more consistent with Android

* Implement TopLevel.AutoSafeAreaPadding (enabled by default)

* Make SafeAreaDemo more representative

* Some fixes + add comments

---------

Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
2023-11-21 12:19:38 +00:00
Max Katz a1b5d6a0e9 Add missing <EnableWindowsTargeting>true</EnableWindowsTargeting> 2023-11-20 20:54:00 -05:00
Max Katz de828103cd Remove lost using 2023-11-20 20:53:31 -05:00
Julien Lebosquain 9f5a1027fd Warning cleanup (#13656)
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
2023-11-20 09:34:46 +00:00
Tom Edwards d62ff00f85 Deferred scrolling (#13644)
* Implemented deferred scrolling

* Set IsDeferredScrollingEnabled in themes, where relevant
2023-11-20 06:17:53 +00:00
Emmanuel Hansen a6e936d74a Implement Next action in android IME (#13222)
* implement Next action in android IME

* Handle UIReturnKeyType.Next on iOS

* Remove NavigationMethod.Directional (do we need focus adorner?)

---------

Co-authored-by: Max Katz <maxkatz6@outlook.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
2023-11-07 09:02:22 +00:00
Tim 8fc0be82cd Converter for DataValidationErrors (#11282)
* 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>
2023-11-07 02:17:07 +00:00
Max Katz 020cf9ff21 Make Avalonia.Browser work on .NET 8 (#13312)
* Update SkiaSharp/HarfBuzzSharp and use proper native bits, make it configurable

* Run UiThreadRender jobs on each animation request in WASM

* Update ControlCatalog to match our current templates

* Add TaskContinuationOptions.ExecuteSynchronously in compositing engine where it's missed

* Log invalid rendering configuration

* Use setInterval isntead of Timer on WASM

* Minor fixes

* Implement BrowserDispatcherImpl and avoid possible memory leak
2023-11-06 23:23:42 +00:00
Alshain e3c8e378a2 Allow TransitioningContentControl to be reversed. (#13003)
* Allow TransitioningContentControl to be reversed. (#12442)

* Fix incorrect property name.

* Add missing pseudoclass attribute.

* Remove reversed transition pseudo class as discussed in review.

* Update samples/ControlCatalog/ViewModels/TransitioningContentControlPageViewModel.cs

Co-authored-by: Max Katz <maxkatz6@outlook.com>

---------

Co-authored-by: Max Katz <maxkatz6@outlook.com>
2023-10-31 00:37:17 +00:00
Magnus Lindhe c7e9651489 Fix previewing XAML in the Simple theme project (#13394) 2023-10-26 16:39:59 -07:00
Steveice10 e0c6e11a42 Add tooltip support to NativeMenuItem. (#13350)
* Add tooltip support to NativeMenuItem.

* Add support for NativeMenuItem tooltips on macOS.
2023-10-24 05:12:56 +00:00
Steveice10 6f0bfbf3aa Exclude access key markers from native menu titles on macOS. (#13338)
* Add integration test for access key indicators in macOS menu bar titles.

Tests for access key indicators displaying as plain underscores in macOS menu bar items.

* Exclude access key markers from native menu titles on macOS.

macOS does not support access key markers, so they just display as extra underscores.
2023-10-23 03:11:37 +00:00
Dong Bin 631a0eda45 Make ColorPicker button content customizable. (#13073)
* 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>
2023-10-02 04:14:40 +00:00
thevortexcloud dbdde5e0fd Add Header content control template for Fluent and Simple themes (#13028)
* 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
2023-09-29 01:16:20 +00:00
Max Katz cd4bf7a02b MacOS file type filter in native file dialog (#12899)
* 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>
2023-09-28 16:45:12 +00:00
Julien Lebosquain 6d4a5031cd Fix MobileSandbox.iOS TFM (#13017) 2023-09-25 19:52:29 +00:00
Max Katz 3de2a0ea91 Bump minimal TFM for mobile projects from .NET 6 to .NET 7… (#13012)
* Bump minimal TFM for mobile projects from .NET 6 to .NET 7 because of MAUI support policy

* Fix api diff
2023-09-25 00:55:19 -07:00
Simon Cropp eb7611488e csproj cleanup (#12657) 2023-09-24 02:38:12 +00:00
Max Katz 292d7acd83 Fix XAML name generator with non-Avalonia XAML files (#13001)
* Fix #12841 by not putting stacktrace in the error message

* Respect SourceItemGroupMetadata to fix #12855

* Fix Generators.Sandbox
2023-09-23 08:50:49 +00:00
Omid Mafakher 3687cb9ecc Samsung Tizen (#12151)
* implement tizen platform, resolve #6110

* Fix enum types of touch event

* Fix issue of touch tracking.

* #6110 fix ui thread lock

* #6110 send keypad from tizen window

* #6110 fix touch update

* #6110 add text editor for input fields

* #6110 Hide text field

* #6110 Fix issue of text selection and backspace

* #6110 support multi and single line for input

* #6110 temporary set multiline true by default.

* #6110 fix issue of build with latest version and make it compatible

* #6110 by pass double input when softkeyboard showing.

* #6110 adding support for clipboard.

* #6110 add permission helper to tizen platform

* #6110 Implementation of storage provider for tizen

* #6110 send text for key character from hard keyboard

* #6110 Complete the input implementation. soft and hard keyboard

* #6110 remove ElmSharp

* Update Permissions.cs

* #6110 remove open folder for tizen

* #6110 fix the issue of keyboard frezee for tizen

* #6110 add workload to build tizen

* #6110 try to setup tizen workloads for windows

* #6110 change tizen workload install to powershell

* #6110 skip api diff check when package not exists

* #6110 try to fix linux pipeline

* #6110 implement tizen native view

* #6110 add dev analyzer and trimming

* #6110 Migrate to GLES and remove framebuffer

* #6110 Temporary solution to make GL work

* #6110 WIP and add comments

* #6110 optimise gles rendering and timing.

* #6110 fix dependency issue of tizen HarfBuzzSharp

* #6110 patch a fix for clipboard issue

* #6110 Support tizen sdk for old proj type, WIP

* #6110 wip setup app

* #6110 support only net6 for tizen

* #6110 resolve comments

---------

Co-authored-by: Kangho Hur <rookiejava+github@gmail.com>
Co-authored-by: Max Katz <maxkatz6@outlook.com>
2023-09-22 01:19:04 +00:00
Max Katz 12863fe9c5 Add XAML usage sample 2023-08-30 19:18:10 -07:00
Max Katz 8b8b137c30 Remove "Show Native Notification" as we won't have them soon 2023-08-30 17:46:12 -07:00
Tim eabaa776cc feat: Customize Notifications 2023-08-30 15:19:10 +02:00
Emmanuel Hansen fa86c3259d fix pointer page scrolling issue 2023-08-28 15:43:45 +00:00
Max Katz 1f0d189502 Revert "Clipboard image" (#12599) 2023-08-20 12:20:24 +03:00
viordash b9a357a5ae Merge branch 'master' into clipboard-image 2023-07-29 18:45:11 +03:00
Giuseppe Lippolis a5f615d783 feat(ControlCatalog): Add sample how binding DataGridColumn Width 2023-07-21 14:23:55 +02:00
viordash 0735c6c602 Merge branch 'master' into clipboard-image 2023-07-20 12:29:46 +03:00
Julien Lebosquain 515e0843de Handle ScrollContentPresenter extent rounding errors 2023-07-19 19:01:44 +02:00
Vitaliy Orazov 92250390a9 change button's text 2023-07-18 16:34:33 +03:00
Vitaliy Orazov 1f9e0a880d remove extra 2023-07-18 15:19:02 +03:00
Vitalii Orazov 4b0c68932d fix CopyBitmapDataObject 2023-07-18 14:36:19 +03:00
Vitalii Orazov eee28d0553 remove extra 2023-07-18 00:50:53 +03:00
Vitaliy Orazov 0ec1c44d07 implement CopyBitmapDataObject 2023-07-18 00:25:43 +03:00
Vitalii Orazov 6df0f1caa1 disable CopyBitmapDataObject 2023-07-17 22:59:52 +03:00
Vitalii Orazov 1484a7d188 wip. ControlCatalog. handling of basic bitmap formats on the clipboard 2023-07-17 22:54:29 +03:00