* Apply tile brush transforms once the tile sits in target space
Brush.Transform was concatenated into the shader matrix before the
translation that moves the tile onto the painted area, so it acted in
the tile's own space instead of the target's. A brush transform on a
fill away from the origin - the common case, since a relative viewport
resolves against the fill's bounds - came out displaced, and WPF, whose
behaviour these brushes follow, disagrees.
Both tile paths now place the tile first and let the transform act on
the result. Where the placement is identity, which is what the existing
goldens cover, the matrices are unchanged.
The cross suite gains an image brush so the non-scalable path is
covered too, plus a smooth ramp fixture: the star line drawing that was
the only image asset survives resampling as sparse speckle, which the
comparison metric cannot tell apart from a geometry error.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Apply the conic gradient transform after its angle
The sweep shader carried Angle as its local matrix and pre-concatenated
Brush.Transform onto it, so the transform acted on the raw sweep and
the angle then turned the result. Every other brush bakes its intrinsic
geometry in first and lets the brush transform act on the finished
pattern.
The visible effect was that a translation moved the gradient in a
direction rotated by Angle - 90 instead of the direction asked for. A
sweep gradient is fully determined by its centre and angle, so the
golden here is checked against the brush with its centre moved by the
same offset and no transform: the two renders are pixel-identical,
while the previous order is 0.169 rmse away against a 0.022 tolerance.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Add RelativeTransform to every brush
A brush transform expressed in the unit space of the painted bounds,
applied before the absolute Transform - WPF's Brush.RelativeTransform.
It lets one brush express a bounds-dependent transform, an SVG
gradientTransform in objectBoundingBox units for instance, without
baking any one consumer's bounds into a matrix, which is what makes a
single brush per gradient definition possible.
The property sits on IBrush and Brush, so every brush kind carries it
and a consumer reads it without a type test. Each immutable brush takes
it through a second constructor, leaving the existing signatures alone
and marking them for collapse in v13. The gradient brush animator
interpolates it alongside Transform, and the composition schema gains
it on both brush bases so the value reaches the render thread as a live
resource rather than a snapshot.
IBrush is NotClientImplementable, so the added member is suppressed for
API validation the way earlier additions to those interfaces are.
Nothing consumes it yet.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Consume RelativeTransform in the Skia backend
The relative matrix is conjugated into target space at draw time - the
unit square maps onto the painted rect, whose origin translation and
scale wrap the matrix - and composes before the absolute brush
transform. All three gradient kinds and both tile brush paths read it;
a solid colour brush has nothing for it to act on, matching WPF. With
no relative transform every path reduces to the previous matrices, so
existing goldens stay byte-identical.
The cross suite compares the result against WPF for the linear and
radial gradients, a drawing brush tiled and untiled, an image brush,
the composition order against Transform, one brush shared by two
differently sized fills, and the solid colour no-op. Goldens under
Skia/Media additionally cover the immediate renderer and the GPU
backends, which the cross suite does not exercise; each was measured
against its WPF counterpart before being committed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* add page navigation using generic type
* add tests
* add default impl to INavigation api
* fix nullable errors
* update api diff
* addressed comment
* update api
* move page externsion to own class
* make parameter overload non-optional
* Update ncrunch config.
* Initial groundwork for typed binding expressions.
- Moved a bunch of stuff from `UntypedBindingExpressionBase` to `BindingExpressionBase`
- Make various APIs accept `BindingExpressionBase` instead of `UntypedBindingExpressionBase`
- Added a typed `IPropertyInfo`
- Added a method on the `CompiledBindingPathBuilder` to build typed property accessors
- Initial basic implementation of `TypedBindingExpression`
* Track values in typed binding expression.
* Support binding mode in typed binding expression.
* Add typed binding expression benchmarks.
Add Setup/Values benchmarks comparing the typed binding expression
against the untyped CompiledBinding (as emitted by the XAML compiler
today) and the reflection-based Binding.
Writing the benchmarks surfaced that TypedBindingExpression never
detached: it had no Dispose override, so disposing a binding (or
rebinding the same property) leaked its PropertyChanged subscriptions
and left it registered in the value store. Wire up disposal mirroring
UntypedBindingExpressionBase: stop, detach handlers, remove from the
value store and frame. This required widening
IBindingExpressionSink.OnCompleted from UntypedBindingExpressionBase to
BindingExpressionBase. Also fix a nullable warning that broke the
Release build.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
* Don't box value in IBindingExpressionSink.OnChanged.
Instead notify the sink of what's changed and let the sink read the value boxed or unboxed.
* Move `IValueEntry` to `BindingExpressionBase`
* Fall back to BindingExpression.
Make `TypedPropertyElement` derive from `PropertyElement` and fall back to creating a standard boxing `BindingExpression` if any of the requirements for a typed binding expression are not met.
* Don't use typed expressions for DataContext.
* Emit typed binding expression from XAML compiler.
When a compiled binding path is shape-eligible (single CLR property on a
reference-type source, no transforms, instance getter) the compiler now
emits a call to the typed CompiledBindingPathBuilder.Property<TSource,
TResult> overload, producing a TypedPropertyElement that the runtime
turns into a non-boxing TypedBindingExpression<TSource, TValue>. Other
shapes continue to use the existing untyped emission path, and runtime
fallback to BindingExpression still kicks in when modifiers (Source,
Converter, StringFormat, etc.) make the typed expression unsuitable.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add failing tests for TwoWay typed binding source echo.
TypedBindingExpression writes the source value back to the source both on
attach and whenever the source raises a change: pushing the value to the
target re-enters OnTargetPropertyChanged, which (in TwoWay mode) calls
WriteValueToSource with the value that just arrived from the source.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Don't echo source value back to source in TwoWay typed binding.
When TypedBindingExpression pushed the source value to the target, the
resulting target PropertyChanged re-entered OnTargetPropertyChanged which,
in TwoWay mode, wrote the value straight back to the source - a redundant
round-trip on every attach and every source-originated change.
Guard the source->target push with a flag and skip WriteValueToSource while
it is set, so only genuine target changes are written back to the source.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Address typed binding code-review follow-ups.
- Reset _isRunning when a typed binding is unsubscribed so the expression
can be restarted (and re-subscribe to its source) if the value store
reactivates the entry later, matching UntypedBindingExpressionBase.Stop().
- Remove a stray `using static PropertySetSnapshot` import.
- Extract the duplicated IValueEntry value-unwrapping logic (shared by
EffectiveValue<T> and DirectPropertyBase) into IValueEntry.TryGetValue.
- Drop the unreachable UpdateSourceTrigger NotSupportedException in
CreateTypedExpression; CanUseTypedBindingExpression already constrains it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Fix TypedBinding_Values benchmark build error.
The typed binding path was built with a single-argument `Property(propertyInfo)`
call, which has no matching overload, so the benchmark project did not compile.
Use the same typed three-argument overload as TypedBinding_Setup so the benchmark
exercises the TypedPropertyElement path.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Skip typed binding expression for data-validation properties.
TypedBindingExpression does not support data validation, but the eligibility
check didn't account for it, so a directly-assignable single-property DataContext
binding to a validation-enabled target (e.g. TextBox.Text, NumericUpDown.Value)
would take the typed path and silently drop validation errors.
Fall back to the untyped BindingExpression when the target property enables data
validation. Data validation support in the typed expression can be added as a
follow-up.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Clarify that data validation is not supported.
* Address typed binding review comments.
- React to null/empty PropertyChanged.PropertyName ("all properties
changed") in the typed expression, matching the untyped path.
- Swallow source getter exceptions raised during PropertyChanged.
- Fall back to the untyped path for non-StyledElement targets, read-only
sources and wider target types in TwoWay/OneWayToSource modes.
- Fix a stray space in an exception message.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Share TypedBindingExpression.Attach validation across instantiations.
Factor the validation logic (most notably the exception string
formatting) out of the generic Attach method into a non-generic static
helper. It only uses typeof(TValue), not TValue, so sharing it avoids
duplicating the code per generic instantiation, a meaningful NativeAOT
size saving (~3.3 KB => ~2.5 KB per instantiation).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Update API suppressions.
These APIs are in a `[PrivateApi]`.
* Use cached boolean boxes in typed binding expression.
Merging main brought in the cached boxed booleans emitted for compiled
binding property getters (#21065), but bindings that now take the typed
binding expression path don't go through that getter: the value is boxed
in TypedBindingExpression.GetUntypedValue when the target property isn't
strongly typed (e.g. binding a bool to TextBlock.Tag). Box booleans via a
shared cache there too, restoring the no-allocation-per-read behaviour.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QkxawATDHa6rbPaDmPCLHZ
* Extract the whole TypedBindingExpression.Attach body into AttachCore.
3198196b4c only factored out the validation, leaving the field
assignments in the generic method. As MrJul pointed out, none of those
assignments depend on TSource or TValue either, so the entire body can
move into a method that doesn't reference the generic parameters and be
shared across instantiations rather than duplicated per instantiation.
Attach is now just a forwarder passing typeof(TValue) as a Type, and
AttachCore reads _sink/TargetProperty directly instead of having them
threaded through as parameters, which reads better than the previous
split.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QkxawATDHa6rbPaDmPCLHZ
* Move the method alongside the other privates.
* Add failing tests for typed binding expression breaking changes.
Each test binds the same property twice: once via a path which produces a
TypedBindingExpression and once via a path which produces an untyped
BindingExpression. The assertions describe the untyped behaviour, so the
typed cases fail where the typed expression diverges:
- A binding with no value (null or incompatible DataContext) publishes the
target property's default value at the binding's priority instead of not
contributing a value, overriding style setters and breaking inheritance.
- Writing a value of another type, or null, to an object-typed target
property throws from OnTargetPropertyChanged.
- No binding error is logged when the DataContext is of the wrong type.
- A throwing source getter leaves the stale value in place.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B66teLaFQBr9GJe4a1aTZm
* Fix typed binding expression divergences from the untyped path.
- Don't notify when the expression has no value and had none before: doing
so pushed the target property's default value at the binding's priority,
overriding style setters and breaking property inheritance.
- Read the target property's new value defensively. The binding value type
only needs to be assignable to the target property type, so the property
can hold a value which isn't a TValue; casting it threw out of the caller's
SetValue.
- Log a binding error when the DataContext can't be converted to the source
type, and when the source getter throws. The getter also now clears the
value rather than leaving the stale one in place.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B66teLaFQBr9GJe4a1aTZm
* Pass correct priority to child bindings.
The priority here doesn't actually have any effect as the binding isn't in a value store, but there's no reason to not use the correct one.
* Use the typed overload.
* Set initial priority to default priority.
Makes `TypedBindingExpressionBase` and `UntypedBindingExpressionBase` have the same behavior here.
* Remove unused vars.
* We now have a typed value here.
* Publish typed binding values on the UI thread.
The source's PropertyChanged event can be raised on any thread, so marshal
the notification to the UI thread as UntypedBindingExpressionBase does.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1ZwmCJkThPSeViLnRxoYs
* Share the property info cache lookup.
Emit and EmitTyped had identical cache lookups, differing only in which
dictionary they searched. Also delay constructing the generic types in
EmitTyped until a cache miss, as they aren't needed on a hit.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1ZwmCJkThPSeViLnRxoYs
* Share the property accessor delegate emission.
EmitFunc was duplicated as a local function in both Emit and EmitTyped.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1ZwmCJkThPSeViLnRxoYs
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Implement TopLevel.OpenedPopups
* Delete Headless `GetOpenPopups`
* Reorganize popup tests between Headless/Primitives layers
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Add Popup.OpenedPopups to keep opened popups in tree structure
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Help NUnit suppressing CS8777
* Update suppresions
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* Add new IPlatformSettings APIs
* Add control catalog PlatformSettingsPage
* Windows PreferredApplicationLanguage implementation
* Browser PreferredApplicationLanguage implementation
* Run API suppressions for the IPlatformSettings
* Rebase PlatformSettingsPage on new ContentPage
* Return CultureInfo.InstalledUICulture instead of CultureInfo.CurrentUICulture for default PreferredApplicationLanguage implementation
* Android PreferredApplicationLanguage implementation
* iOS PreferredApplicationLanguage implementation
* Use GetUserPreferredUILanguages for Win32 implementation instead of GetUserDefaultLocaleName
* MacOS implementation of PreferredApplicationLanguage
* Use GlobalizationPreferences for WIn32 prefered language, GetUserPreferredUILanguages doesn't work as expected with Windows settigns
* Avoid AvaloniaLocator in control catalog
* Remove unused method
* Add value/remarks XML docs on the PreferredApplicationLanguage
* Implement visual geometry hit testing
* fix xml comment
* fix xml comment
* update api diff
* Introduced ICompositionHitTester to avoid duplicated hit test code between point and geometry
* Add geometry hit testing page to RenderDemo
* fix geometry hit testing not including stroke
* fix test
* update api and tests
* update api diff
* Update GeometryHitTestingPage with new API
* addressed reviews.
* remove nullability in GeometryHitTestResult Visual hit
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Expose IRef/IImageBrushSource, update build/api suppressions
* Hide IRef from image brush source API
Internalized `IRef<T>` and removed it from the `IImageBrushSource` public surface by making `Bitmap` internal. Added a `[PrivateApi]` `GetBitmap()` helper returning `IBitmapImpl?` so internal consumers can still access the bitmap without exposing ref-count internals. Updated Skia drawing code to use `GetBitmap()` and refreshed API suppression entries accordingly.
* Adding TransparencyLevel property to CompositionTarget
* Try to pass the WindowTransparencyLevel to surface
* Enable change the AlphaMode in WinUI window.
* Support disable transparency explicitly;
* Adding the test demo code.
* Fix ICompositionDrawingSurfaceInterop.BeginDraw fail. Because the surface do not set size.
* Merge the same code
* Fix compile
* Add test demo code
* Put the re create surface to trycatch block.
Solve the `transaction` do not be disposed when CreateSurface exception.
* Add the dynamic Transparency alpha mode support to DirectComposited
* Revert "Adding TransparencyLevel property to CompositionTarget"
This reverts commit da0af790b1.
* Adding TransparencyLevel property to CompositionTarget
* Adding TransparencyLevel to RenderTargetSceneInfo
* Try remove the pass level
* Finish pass RenderTargetSceneInfo to create surface.
* Remove the unuse argument
* Remove the unuse code
* Bring the comments closer to the code
* Revert sort using
* Remove the unuse using
* Try fix compile error
* Remove the unuse namespace using.
* Try fix API changed
* Try fix compile
* Update api
* Change DnD trigger event to PointerPressedEventArgs
* Update API suppressions
* Switch IPlatformDragSource to a private API
* Update API suppressions
* Introduced "forced" CSD mode without app opting in
* C is for Consistency
* api diff
* [X11] Better handling of forced-vs-app-triggeed CSD
* Round WindowDrawnDecorations sizes to be pixel-aligned
* Make Window.WindowState a direct property with (on some platforms) reliable values
* Use reported window state from the callback
* compile
* Actually use the cached value in WindowState getter
* api diff
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Tests for our erratic WindowState behavior.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Make FlyoutBase.IsOpen a public StyledProperty with two-way binding support
Convert IsOpen from a DirectProperty with a protected setter to a
StyledProperty with a public setter and TwoWay default binding mode.
This enables MVVM scenarios where a ViewModel can control flyout
visibility through data binding.
The implementation mirrors the established Popup.IsOpen pattern:
- Reentrancy guard (BeginIgnoringIsOpen scope) prevents recursive
property change notifications when internal code syncs the property
- SetCurrentValue preserves active bindings and styles (enforced by
analyzer AVP1012)
- _isOpen field tracks actual open state independently of the property
value, since the property system sets the value before the change
handler fires
- _lastPlacementTarget enables re-opening at the last known target
when IsOpen is set to true via binding
- IsOpen reverts to false when no target is available or opening is
cancelled, and reverts to true when closing is cancelled, keeping
the property honest
Fixes#18716
* ci: retrigger checks
* Add API suppression for FlyoutBase.IsOpenProperty type change
Suppress CP0002 for the intentional binary breaking change from
DirectProperty<FlyoutBase, bool> to StyledProperty<bool>.
* Pre-register owning control as flyout placement target
When Button.Flyout or SplitButton.Flyout is set, the owning control
now registers itself as the default placement target via an internal
SetDefaultPlacementTarget method. This allows IsOpen = true to work
on first use without a prior ShowAt call, addressing review feedback
from MrJul.
* Remove TwoWay default binding mode from IsOpenProperty
Follow Avalonia convention: Popup.IsOpen and ToolTip.IsOpen use the
default OneWay binding mode. TwoWay is reserved for input controls.
Users opt in with Mode=TwoWay when needed.
* refactor: Replace IsPopup with Enable*Layer properties on VisualLayerManager
- Remove IsPopup from VisualLayerManager, add granular Enable*Layer properties:
EnableAdornerLayer (default true), EnableOverlayLayer (default false),
EnablePopupOverlayLayer (internal, default false), EnableTextSelectorLayer (default false)
- Add PART_VisualLayerManager template part to TopLevel with protected property
- Window and EmbeddableControlRoot override OnApplyTemplate to enable
overlay, popup overlay, and text selector layers
- OverlayLayer is now wrapped in a Panel with a dedicated AdornerLayer sibling
- AdornerLayer.GetAdornerLayer checks for OverlayLayer's dedicated AdornerLayer
- Update all 8 XAML templates (both themes) to name PART_VisualLayerManager
and remove IsPopup="True" from PopupRoot/OverlayPopupHost
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add XML doc to VisualLayerManager
* Also search for AdornerLayer from TopLevel
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Allow `TextSearch.TextBinding` on non-controls.
Allow setting `TextSearch.TextBinding` on non-controls: in particular I would like to be able to set it on (tree) data grid columns. For example:
```
<TreeDataGrid>
<TreeDataGridTemplateColumn TextSearch.TextBinding="{Binding Foo}">
<DataTemplate>
<TextBlock Text="{Binding Foo}"/>
</DataTemplate>
</TreeDataGridTemplateColumn>
</TreeDataGrid>
```
* Allow TextSearch.Text on non-controls
* Update API suppressions
* Rename TextSearch.GetText parameter
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Don't tick with render loop when app is idle
* Update src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamArrayPool.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* wip
* wip
* api diff
* fixes
* Address review: clear wakeupPending at tick start, guard CarbonEmissionsHack subscriptions
- Clear _wakeupPending at start of TimerTick so wakeups already processed
by the current tick don't force an unnecessary extra tick
- Guard CarbonEmissionsHack against duplicate subscriptions using a private
attached property
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix lock-order inversion in Add/Remove vs TimerTick
Move Wakeup() and Stop() calls outside the _items lock in Add/Remove
to prevent deadlock with TimerTick which acquires _timerLock then _items.
Add/Remove are UI-thread-only so the extracted logic remains safe.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address review: remove unused usings, guard double Stop(), fix SleepLoop extra frame
- Remove unused using directives from IRenderLoopTask.cs
- Guard TimerTick Stop() with _running check to prevent double Stop()
when Remove() already stopped the timer
- SleepLoopRenderTimer: use WaitOne(timeout) instead of Thread.Sleep
so Stop() can interrupt the sleep, and recheck _stopped before Tick
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix DisplayLinkTimer foreground handler bypassing render loop state
Only resume the display link on WillEnterForeground if the timer was
calling Start() to avoid setting _stopped=false when the render loop
had the timer stopped.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix DisplayLinkTimer thread safety, revert global NU5104 suppression
- Stop() now only sets _stopped flag; OnLinkTick() self-pauses the
CADisplayLink from the timer thread to avoid thread-affinity issues
- Revert NU5104 global suppression in SharedVersion.props
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Cap _ticksSinceLastCommit to prevent int overflow
Stop incrementing once it reaches CommitGraceTicks to prevent
wrapping negative and keeping the render loop awake indefinitely.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: remove Start/Stop from IRenderTimer, merge into Tick setter
Timer start/stop is now controlled entirely by setting the Tick
property: non-null starts, null stops. This eliminates the explicit
Start()/Stop() methods from IRenderTimer, making the API simpler.
DefaultRenderLoop controls the timer purely through Tick assignment
under its _timerLock. A new _hasItems flag tracks subscriber presence
since Tick is now transient (null when idle).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address review comments on timer thread safety and guards
- ChoreographerTimer: add _frameCallbackActive guard to prevent double
PostFrameCallback from both Tick setter and SubscribeView
- ServerCompositor: cap _ticksSinceLastCommit at int.MaxValue
- SleepLoopRenderTimer: make _tick volatile, remove _stopped recheck
(guard moved to DefaultRenderLoop)
- DefaultRenderLoop: add _running check at tick start to drop late ticks
- ThreadProxyRenderTimer: add lock for internal state manipulation
- DisplayLinkTimer: add lock for all internal state manipulation
- Re-add NU5104 suppression to SharedVersion.props
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: make _hasItems volatile for cross-thread visibility
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: guard against redundant starts in DefaultRenderTimer, make _tick volatile across all timers
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove CarbonEmissionsHack, revert iOS/Android timers to always-ticking
- Delete CarbonEmissionsHack class and its XAML reference
- Revert DisplayLinkTimer (iOS) to original always-ticking implementation
- Revert ChoreographerTimer (Android) to original always-ticking implementation
- Add TODO comments for future start/stop on RenderLoop request
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix DirectCompositionConnection WaitOne not respecting process exit cancellation
Use WaitHandle.WaitAny with both _wakeEvent and cts.Token.WaitHandle so
the loop can exit when ProcessExit fires while the timer is stopped.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* timers
* XML docs
* Cache delegate
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Implemented new drawn window decorations API
TODO: check if it works on Win32, bring back titlebar automation peer
* Adjusting naming a bit
* Naming / configuration changes
* Various fixes
* popover fix?
* wip
* Address review
* Extra window roles
* WIP
* Fixed drawn titlebar automation
* Purge ExtendClientAreaChromeHints.
* Fixed dynamically enabling drawn decorations
* api diff
* Add automation IDs for drawn decorations buttons
* Resolved the issues
* build
* Retry a few times when Pager isn't available after test is finished
* Only do faulty test detection if asked
* duplicate package reference
* Try disabling faulty tests on appium1
* Fix ExtendClientAreaWindowTests
* Apply initial button states
* Enable CSD shadow for X11
* net8?
* Address review
* more review comments
* Moar review comments
* Extra hit-test checks
* Moar review
* Prefix integration test app exitfullscreen to avoid clashes
* Disable drawn decorations if parts = None
* Respect SystemDecorations value on mac in extend-client-area mode
* Tidy up logic a bit
* Adjust win32 tests to titlebar not being in the tree when CSD are not enabled
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* move gesture events from Gestures to InputElement. Fix holding gesture interactions with context menu
* update api diff
* address review comments
* fix some test types
* rename Cancelled to Canceled
* update api diff
* Make MathUtilities internal
* Remove old overloads from LayoutHelper
* Make DrawingContextHelper.WrapSkiaCanvas internal
* Update API suppressions
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Make some overlay-related types/members internal
* Make sure that TopLevel is no longer the actual root of the visual tree. This is needed for our future changes.
* API diff
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixed incorrect test
* Make automation to target FocusRoot
* api diff
* Hide WindowBase/EmbeddableControlRoot's parents from automation
* api diff
* Separate automation root and visual root for automation purposes
* Hide ChromeOverlayLayer from public API
* Synchronize WindowBase visibility to VisualRoot
* Hide WindowBase.ArrangeSetBounds
* api diff
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Extracted IInputRoot out of TopLevel
* Move some input handling out of TopLevel
* Remove old class, make layout manager private
* Removed IRenderRoot
* Make VisualTreeAttachmentEventArgs a bit more sensible
* Move ILayoutRoot to PresentationSource
# Conflicts:
# tests/Avalonia.Controls.UnitTests/TabControlTests.cs
* Updated some VisualRoot / GetVisualRoot usages
* Updated more XxxRoot usages
* More Root usages
* Addressed review
* Hurr-durr xml
* More fixes
* Maybe fix android compilation
* API diff
* Yet another cast
* I had to use MSIL analysis to detect those casts
* Fixed automation
* Fix PointerOverPreProcessor
* Fix?
* Removed yet another cast to Visual
* The amount of random downcasts is astonishing
* Maybe fix mac
* Addressed review
* Make binding plugin API internal.
Making everything pluggable like has performance implications even if the plugins are never customized (which will be the 99% case).
`IPropertyAccessor` is used in `CompiledBindingPathBuilder` so needs to be kept public for the moment.
* Disable Data Annotations validation by default.
It [conflicts with `CommunityToolkit.Mvvm`](https://github.com/AvaloniaUI/Avalonia/issues/8397) which is now the default MVVM framework, so require it to be enabled in the `AppBuilder`.
* Update API supressions.
* Add back missing using
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>