Branch:
fixes/macos-owned-window-level-inheritance
0.10.0-diff-stable-0.9.11
0.8-backports
0.8-work
0.9/xamlx
5940-dragdrop-modal
7963-stable
Blaz
MikeCodesDotNET-coc-update
NumericUpDown_Fix_5318
Stylus
UnsafeAsSpan-logical-children
about-dialog-redesign
add-expanderAutomationPeer
add-integration-tests
add-missing-type-converters
add-remote-designer-test
android-profile
android_clipboard
android_naot
android_native_window_crash
android_previewer
android_text_client
animation-fill-modes-test
animations-property-path
aot-test-pipeline
api-diff-demo
appium2-vm-test
archive/wieslop-pr-to-prevent-him-from-deleting-the-repo-again-and-claiming-that-stuff-didnt-happen
attach-dev-tools-conditional
attempt-datacontext-application-class
backport-11096
backports/19939
backup/fixes/catalina-red-window-15-16-08
baget-ci-test
border-clip-test
bug/focus-within-not-cleared
bump-diagnosticssupport
castxml-0.2
chart-control
china
codefreeze-0.7
codice/preview4-plus-10064
comp-size-implicitanim-repro
compile-bindings-by-default-property
composition/license
consistent-names
context-menu-refactor
control-theme-idea
critical-time-visual
customers/chaos-11.0
customers/outsystems-11.1.X
customers/outsystems-11.1.x-without-2-prs-for-testing
customers/outsystems-11.2
customers/outsystems-branches/11.2-test-port-19132
customers/outsystems/11.2-test-port-19132
customers/se-eae
dans-repro
dans-repro-without-1284
datagrid-combobox-column
dbus-tray-icon-fix-2
debug-wasm-clicks
debug/gl-texture-mem-intercept
debug/skia-sharp-vmem
demo
demo1
designer_protocol_theme_variant
dev/timill/EglExternalObjectsFeature
dev/timill/catalyst
dev/timill/dma-buf
dev/timill/egl-take-two
dev/timill/macos-setup-app
dev/timill/metal
dev/timill/skiasharp-4-test
dev/timill/styles-animation
dev/timill/win-arm64-build
dev/timill/window-decorations-macos
dev/timill/winui-test
diagnose-ci
direct-comp-archive
disbar
dispatcher-scheduler
do-not-sign-rxui-attempt-2
doc-fixes
dont-self-register-font-manager
drawing-context-hack
droid
effective_viewport_bug_repro
emmaus/gradient_test
empty_text_run_fix
event-setter
exp/drawn-decorations-template
experiment-alpha-niner
experiment/fixing-key-events-macos-embedding
experiment/lazy-load-styles-resources
experiment/merged-fluent-theme
experiment/reflection-free
experiment/skia-known-extensions
experiment/styleinclude-filter
experiments/vulkan-interop-2025-10-29
expose-cut-copy-paste-textbox
feature-presentation-source-2
feature/17731-null-conditional-bindings
feature/2769-control-themes
feature/3109-listen
feature/ImePreeditText
feature/acrylic-brush-investigation
feature/add-get-pixels-to-IBitmapImpl
feature/backdrop-effects
feature/backdrop-experiment
feature/background-fb-transfer
feature/client-frame-in-titlebar
feature/composition-swapchain
feature/composition-tree-inspector
feature/crapium
feature/custom-visual-oob-message
feature/custom-visual-sync
feature/drawn-csd-template
feature/epoll-dispatcher-impl
feature/extract-harfbuzz
feature/flaui-webdriver
feature/fluent-calendar
feature/fluent-scrollbar
feature/fluent-slider
feature/fluent-slider-template
feature/fluent-text-box
feature/flyout-overlayinputpassthrough
feature/flyouts
feature/forced-csd
feature/fullscreen-window-state
feature/gh-actions
feature/gpu-improvements
feature/headless-touch
feature/heterogeneous-item-containers
feature/icons
feature/ilogicalvisualchildren
feature/integer-clip-bak-1
feature/integration-tests-vm-migration
feature/linux-automation
feature/linux-automation-backup
feature/managed-chrome-buttons-api
feature/media-queries
feature/microcom-get-managed-reference
feature/offthread-composition-interop
feature/opengl-image-api
feature/opengl-swapchain
feature/optimized-matrix
feature/pass-shadow-extents-to-platform
feature/pen-eraser-detection
feature/pluggable-input-methods
feature/presentation-source-2
feature/public-frost
feature/remove-legacy-renderers
feature/render-inside-windows-ui-composition-visual-tree
feature/render-thread-transparency
feature/resource-batch-update
feature/save-render-frames
feature/skia-cpu-copy
feature/staggeredlayout
feature/support-more-image-formats
feature/test-branch
feature/textbox-gestures-mac-cmd+
feature/typed-binding-2
feature/typedbinding
feature/ui-automation-atspi
feature/ui-automation-textprovider
feature/ui-automation-textprovider-2
feature/validate-draw-calls
feature/vulkan
feature/wayland-deps
feature/wayland-subcompositor
feature/wd/platform-specific-cookies-pointer-events
feature/windowstate-fullscreen
feature/wmt
feature/writablebitmap-drawingcontext
feature/x11-ime-preedit
feature/x11-incr
feature/x11-primary-selection
features/atspi-peering-mode
features/dbus+atspi2+kdeappiumdriver
features/instant-dark-light-mode-switch
features/manually-managed-layer-textures
features/modal-windows
features/net6-apple-sillicon-support
features/prep1-nullable-reference-types
fies/15433-itemscontrol-interactions-to-containers
fix-ci
fix-mac-special-character-input
fix-mousedevice-not-reporting-clicks-when-any-mouse-button-is-pressed
fix-popup-topmost-windows
fix-windowicon-crash-linuxdrm
fix/DataGridCopyClearsContent
fix/avnview-hittest
fix/ibus-committext-reset
fix/osx-ax-frame-window
fix/osx-ax-honor-ignored-elements
fix/osx-ax-offscreen-noncontrol-children
fix/osx-ax-visible-children
fix/render-stall
fix_colors_change_event_spam
fixes-data-validation-errors-use-datatemplates
fixes/11167-pagetransition-flicker
fixes/11484-coercevalue-called-multiple-times
fixes/1399-dispatchertimer-disposable
fixes/1440-menu-navigation
fixes/1758-implement-non-recycling-virtualization-mode
fixes/17699-uniformgrid-snapping
fixes/20845-tabitem-datacontext-binding-2
fixes/2129-grid-textwrapping
fixes/21746-update-target-explicit
fixes/2725-datatemplate-nested-types
fixes/2957-carousel-stackoverflow
fixes/2983-onewaytosource-twoway
fixes/4293-listbox-remove-item-selection
fixes/4496-selectionmodel-issues
fixes/6684-two-way-style-bindings-with-localvalue
fixes/7777-menu-accelerator
fixes/7925-attached-property-syntax
fixes/9007-priority-in-control-templates
fixes/971-selector-child-of-named
fixes/PreviewWithv12
fixes/add-fluent-theme-tests-and-several-fixes
fixes/android-perf-maybe
fixes/android-render-issue
fixes/appium2
fixes/automation-localization-issues
fixes/avalonia-win32-nullability
fixes/avdbus-impl2
fixes/build-stable-with-6.0.202
fixes/build-task-update-try-fix
fixes/caret-index-lost-when-selection-cleared
fixes/center-screen-maximized-parent
fixes/clear-batch-object-pool-sooner
fixes/compositing-renderer-invalidatevisual-sanity-checks
fixes/disable-fullscreen-overlay-for-border-only-mode
fixes/disable-fullscreenwindow-tests-osx
fixes/dispatcher-frame-dispatcher
fixes/dont-allow-focus-non-visible-elements
fixes/dragdrop-pointer-stuck
fixes/draw-line-on-deferred-renderer
fixes/effect-clip
fixes/effect-clip-rect
fixes/enable-multi-touch-by-default
fixes/fix-android-perf-maybe-2
fixes/gpu-interop-check-dedicated-allocation-needed
fixes/grcontext-options
fixes/hackfix-skia-gpu-interop
fixes/handle-invalid-dirty-rects
fixes/immutable-bitmap-bitmapmemory-backing
fixes/integration-tests-window-management
fixes/less-warnings
fixes/listbox-selecteditem-not-in-item-ignored
fixes/macos-dont-raise-text-input-if-key-handled
fixes/macos-duplicate-a11y-window
fixes/macos-owned-window-level-inheritance
fixes/macos-uri-handling
fixes/make-iinlinehost-public
fixes/metal-resize-jitter
fixes/microcom-bump
fixes/ncrunch-references
fixes/nsopenpanel-shortcut
fixes/osx-hidden-window-activation
fixes/osx-rendering-glitches
fixes/pendevice-remove-global-state
fixes/publish-avalonia-native-osx-package-seperately
fixes/pump-dispatcher-before-invoking-native-loop
fixes/re-enable-full-sharpgentools
fixes/readd-references-file
fixes/remove-adorner-hack
fixes/remove-loaded-virtual-method
fixes/render-layers
fixes/resizing-wasm
fixes/round-corner-clip-border
fixes/selectionmodel-handle-move
fixes/stable-disable-roll-forward
fixes/stack-overflow-resources
fixes/standalone-content-presenter
fixes/tcc-333
fixes/text-layout
fixes/textLineMetrics
fixes/ticket-745
fixes/tmp
fixes/too-many-layers
fixes/transitions-property-changes
fixes/tree-selectionmodel
fixes/treeview-nonmaterialized-selection
fixes/wasm-layout-render-sync
fixes/win-ui-comp-global-lock
fixes/win32-maximize-not-applied-initially-when-height-set
fixes/window-close-crash
fixes/window-close-crash-testcode
fixes/window-management-stage-manager
fixes/xamlx-generic-type-resolution
fixes/yet-another-dbus-typing-fix
flickerRepo
fluent-textbox-update
focus-and-keyboard
focus_prototype
focus_tree_state
font-tests
force-ci/composition-rework
force-ci/xaml-perf-improvements
foreign-embed-squash
foreign-embed-wip
foreign-embed2
git-pr_6982_rework
global-menu
gpu-optimised-deferred-rendering
grid-tests
grokys/experiment/appium-2
grokys/experiment/appium-2-2
grokys/experiment/more-benchmarks
grokys/experiment/new-itemscontrol
grokys/experiment/new-styling
grokys/framebuffer-skip-memcpy
grokys/trying-to-fix-integration-tests
grokys/update-net-5.0
gtk-solution
hack/emulate-touch-events
headless-tests
headless-timers
html-auto-port
ignore-capture-on-pointer-entered-exited
image-filters
image-scrolling-repro
implement-decorated-window-dragging
inlinesTheThird
integration-tests-selenium
ios-dev
ios-fix
issue-457
itemspresenterbase
jw/native-graphics
jw/wip/wayland
keyframe-binding
knock-knock-are-integration-tests-even-alive
layers-wtf-repro
linux-mono-down
main
managed-dialog-extras-0.9
managed-mouse-pointer
manual-fbo
maxkatz6-patch-1
memory-leak-repro-commit
menu-contexntmenu-slection-is-not-consistant
mergeWithDrawingRecording
microcom-net5-features
missing_content_repro
move
move_resize
nativeMenu-leak-fix
nativeMenuItem-leak-macOS-fix
nativeaot-llvm-experiment
ncomposition
net11-browser
new-weak-events
no-layer-hack
no-llvmpipe
no_composition_rounded
notify-test
old/2025-12-06
onformfactor_issue
open-contextmenu-with-keyboard
opentk-integration
osx-fixes
osx/maximised-set-in-xaml-fix
package-control-catalog
page_proto
parma-fixes-2020-10
pivot_touch
platform_feedback
popup-repro
port/wpf-uniformgrid
portable-xaml
pr4a/fvar-avar-parsing
pr4b/glyph-typeface-with-variation
pr4c/gvar-deformation
pr4d/hvar-advances
pr4f/mvar-metrics
pr4g/vvar-advances
pr4h/font-variations-user-api
pre-lifetime-fixes
property-path
property_transition_stops_repro
psp-repro
pull/14157
rc1-testing
refactor/avaloniapropertystore
refactor/binding-refactor-2025
refactor/binding-to-reflectionbinding
refactor/bindingexpressions-in-valuestore
refactor/bindings-are-expressions
refactor/compiledbinding-refactor-2025
refactor/datavalidation-plugins
refactor/iavaloniaobject-nongeneric
refactor/itemsrepeater-as-itemspresenter
refactor/itemsrepeater-as-itemspresenter2
refactor/layout
refactor/logical-child-optimize
refactor/more-nullable-avalonia-base
refactor/onpropertychanged-nongeneric
refactor/style-priorities
refactor/visual-child-optimize
refactor_pointerover_backportable
release/0.10.0
release/0.10.0-preview1
release/0.10.0-preview2
release/0.10.0-preview3
release/0.10.0-preview4
release/0.10.0-preview5
release/0.10.0-preview6
release/0.10.0-rc1
release/0.10.0-rc2
release/0.10.1
release/0.10.10
release/0.10.11
release/0.10.11-rc.1
release/0.10.11-rc.2
release/0.10.12
release/0.10.13
release/0.10.14
release/0.10.15
release/0.10.16
release/0.10.17
release/0.10.18
release/0.10.19
release/0.10.2
release/0.10.20
release/0.10.21
release/0.10.22
release/0.10.3
release/0.10.4
release/0.10.5
release/0.10.6
release/0.10.7
release/0.10.8
release/0.10.9
release/0.7.0
release/0.8.0
release/0.8.1
release/0.8.2
release/0.8.3
release/0.8.4
release/0.9.0
release/0.9.0-preview1
release/0.9.0-preview10
release/0.9.0-preview2
release/0.9.0-preview3
release/0.9.0-preview4
release/0.9.0-preview5
release/0.9.0-preview6
release/0.9.0-preview7
release/0.9.0-preview8
release/0.9.0-preview9
release/0.9.0-rc.1
release/0.9.0-rc.2
release/0.9.0-rc0001
release/0.9.1
release/0.9.10
release/0.9.11
release/0.9.12
release/0.9.2
release/0.9.3
release/0.9.4
release/0.9.5
release/0.9.6
release/0.9.7
release/0.9.8
release/0.9.8.1
release/0.9.9
release/11.0
release/11.0.0
release/11.0.0-preview1
release/11.0.0-preview2
release/11.0.0-preview3
release/11.0.0-preview4
release/11.0.0-preview5
release/11.0.0-preview6
release/11.0.0-preview7
release/11.0.0-preview8
release/11.0.0-rc1.1
release/11.0.0-rc2.1
release/11.0.0-rc2.2
release/11.0.1
release/11.0.10
release/11.0.11
release/11.0.12
release/11.0.13
release/11.0.2
release/11.0.3
release/11.0.4
release/11.0.5
release/11.0.5-rc1
release/11.0.6
release/11.0.7
release/11.0.8
release/11.0.9
release/11.1
release/11.1.0
release/11.1.0-beta1
release/11.1.0-beta2
release/11.1.0-rc1
release/11.1.0-rc2
release/11.1.1
release/11.1.2
release/11.1.3
release/11.1.4
release/11.1.5
release/11.2
release/11.2.0
release/11.2.0-beta1
release/11.2.0-beta2
release/11.2.0-rc1
release/11.2.0-rc2
release/11.2.1
release/11.2.2
release/11.2.3
release/11.2.4
release/11.2.5
release/11.2.6
release/11.2.7
release/11.2.8
release/11.3
release/11.3.0
release/11.3.0-beta1
release/11.3.0-beta2
release/11.3.0-rc1
release/11.3.1
release/11.3.10
release/11.3.11
release/11.3.12
release/11.3.13
release/11.3.14
release/11.3.15
release/11.3.16
release/11.3.17
release/11.3.18
release/11.3.19
release/11.3.2
release/11.3.20
release/11.3.21
release/11.3.22
release/11.3.3
release/11.3.4
release/11.3.5
release/11.3.6
release/11.3.7
release/11.3.8
release/11.3.9
release/12.0
release/12.0.0
release/12.0.0-preview1
release/12.0.0-preview2
release/12.0.0-rc1
release/12.0.0-rc2
release/12.0.1
release/12.0.2
release/12.0.3
release/12.0.4
release/12.0.5
release/12.1
release/12.1.0
release/12.1.1
release/12.1.2
release/latest
release/outsystems/0.9.11
remote-devtools
remove-acrylic-blur-from-old-win
removing-compositional-renderer-license
render-only-on-render-thread
repro-ap
repro-ap-1
repro-arcsegment-not-updating
repro-binding-window-state
repro-bindingprio-bug
repro-garbled-graphics
repro-ienumerable-menu-navigation
repro-invalid-draw-calls
repro-items-repeater-issue
repro-properties
repro-req-an-frame
repro-resource-recursion
repro-selected-items-not-working
repro-selecting-items-control-not-working-inside-popup
repro-window-close
repro/1326-data-binding-issue
repro/1436-layout-not-done-after-style-applied
repro/1707-listbox-virtualization-resize-performance
repro/1758-virtualizer-measured-items
repro/18104-drag-drop-flyout-placement
repro/20845-tabitem-datacontext-binding
repro/binding-attached-property-from-style
repro/binding-isfocused
repro/bound-listboxes
repro/caret-binding-failure
repro/carousel-not-materializing-content
repro/dynamic-resource-bug
repro/minimal-repro-stackoverflow-onewaytosource-binding
repro/outsys-sizing-issue
repro/properties-overhaul-bug
repro/radial-gradient-transform
repro/size-to-content
repro/window-not-obey-min-height
repros/content-presenter-regression
repros/custom-fonts-pr
repros/text-alignment-issue
repros/web-null-signature
revert-10284-feature/impl-IReadableBitmapImpl-in-SurfaceRenderTarget
revert-13066-fixes/13064-logical-scrollable
revert-14106
revert-18343-bump-dbus-stack
revert-2489-fixes/2432-carousel-insert
revert-2645-issue2613
revert-3221-undecorated-window
revert-selectionmodel
rtb-gl-fixes
scenegraph-after-breakage
scroll-measure
scroll_transition_repro
sdks-update
set-empty-x11-title-instead-of-null
simplify-testing
size-to-content-render-repro
skia-foreign-bitmap
sound
stable-test-mac-os-fix
stable/0.10.0
stable/0.10.x
stable/0.10.x-codice
stable/0.10.x-outsys
stable/0.10.x-se
stable/0.9
stable/outsystems-0.9
stable/parm-0.9
stable/tmp8
strongname
stx/0-preedit-reentrancy
stx/1-text-navigation
stx/10-macos-nstextinputclient
stx/11-android-inputconnection
stx/12-ios-responder
stx/13-win32-tsf
stx/2-automation-text-provider
stx/3-uia-text-pattern
stx/4-atspi-text
stx/5-grid-table-patterns
stx/6-structured-text-input
stx/7-composition-in-document
stx/9-win32-imm
styleable-grid-rowcoldefs
styles-not-getting-applied-repro
system-xaml
tabcontrol-bound-items
temp/implement-hdr
temp/rpi-slowness
temp/testbuild-skia-extensions
test-log-box-shadow
test-meta-packages
test-multiple-optimizations-together
test-package-run
test-saverestore-layer
test-styleable-rowcol-defs
test-sub-menu-item
test/suppressActivationEvents
test/trigger
test11
tests/animations-p1
tests/default-font-fail-nativeaot
testy-test
text-input
text_ime_client_direct
text_selector_adorner
text_selector_magnifier
text_selector_zindex
themes/fluent2
thread-issue-repro
timer-overload
tinywm
tmp-2
tmp-angle
tmp-build-dan
tmp-menu-disable
tmp-winuicomp_with_manual_fbo
tmp/11.0
tmp1
tmp4
tmp6
tmp9
transitions-bugfix-deux
transparency-hints-list
treeview-issue-repro
try-critical-branch-bringup-2
try-fix-3336
ui-automation-test
update-avalonia-dbus-submodule
update-submodules
upgrade-angle
use-net7-tizen
v0.8
virtualized_wrappanel
virtualizeing_wrappanel_rc1
virtualizing_grid
visual-extensions-fallback
visualbrush_recreate
vnc-mouse-drag-issue
vnext
wasm_editcontext
win-ui-comp-with-manual-fbo
win32-jitter-hack
win32_client_pos_test
win32_hidden_border_fix_test
win32_mouse_wheel_zoom
window_hide_test
windowing-prototype
windowing-prototype-drag-and-drop
winit-legacy
wip/use-selectionmodel
wip_snappoint_anchor
x11-mit-shm
x11-test-without-render-window
x11_allowed_actions
xaml_composition_animations
xaml_integrated_comp_animations
xamlil-debug-info
xclass-generator
xdatagrid-experiment
xi2-leave-event
xpf-old
xpf/composition-rework-branch
xpf/primary-mouse-device
xpf/screen-fix-21750
xpf_win32_test
xsd-generator
xy-focus-and-tvos
xy-focus-skiasharp-3
0.0.1-alpha
0.1.0-alpha2
0.1.1
0.1.10
0.1.2
0.1.3
0.1.4
0.1.9
0.10.0
0.10.0-preview1
0.10.0-preview2
0.10.0-preview3
0.10.0-preview4
0.10.0-preview5
0.10.0-preview6
0.10.0-rc1
0.10.0-rc2
0.10.0.10
0.10.0.4
0.10.1
0.10.10
0.10.11
0.10.12
0.10.12.23
0.10.13
0.10.13.24
0.10.14
0.10.15
0.10.16
0.10.17
0.10.18
0.10.19
0.10.2
0.10.20
0.10.21
0.10.22
0.10.3
0.10.4
0.10.5
0.10.6
0.10.7
0.10.8
0.10.9
0.2.0-preview
0.2.1-preview
0.3.1-preview
0.4.0
0.4.1
0.5.0
0.5.1
0.7.0
0.8.0
0.8.1
0.8.2
0.8.3
0.8.4
0.9.0
0.9.0-preview1
0.9.1
0.9.10
0.9.11
0.9.12
0.9.2
0.9.2.18
0.9.2.19
0.9.3
0.9.4
0.9.5
0.9.6
0.9.7
0.9.8
0.9.9
1.0.1
1.0.4
1.1.1
1.1.2
1.2.1
1.3.1
1.3.4
1.4.1
1.4.2
1.5.1
1.6.1
10367-checkpoint1
11.0.0
11.0.0-preview1
11.0.0-preview2
11.0.0-preview3
11.0.0-preview4
11.0.0-preview5
11.0.0-preview6
11.0.0-preview7
11.0.0-preview8
11.0.0-rc1.1
11.0.0-rc2.1
11.0.0-rc2.2
11.0.1
11.0.10
11.0.11
11.0.12
11.0.13
11.0.2
11.0.3
11.0.4
11.0.5
11.0.5-rc1
11.0.6
11.0.7
11.0.8
11.0.9
11.1.0
11.1.0-beta1
11.1.0-beta2
11.1.0-rc1
11.1.0-rc2
11.1.1
11.1.2
11.1.2-rc1
11.1.3
11.1.4
11.1.5
11.2.0
11.2.0-beta1
11.2.0-beta2
11.2.0-rc1
11.2.0-rc2
11.2.1
11.2.2
11.2.3
11.2.4
11.2.5
11.2.6
11.2.7
11.2.8
11.3.0
11.3.0-beta1
11.3.0-beta2
11.3.0-rc1
11.3.1
11.3.10
11.3.11
11.3.12
11.3.13
11.3.14
11.3.15
11.3.16
11.3.17
11.3.18
11.3.19
11.3.2
11.3.20
11.3.21
11.3.22
11.3.3
11.3.4
11.3.5
11.3.6
11.3.7
11.3.8
11.3.9
12.0.0
12.0.0-preview1
12.0.0-preview2
12.0.0-rc1
12.0.0-rc2
12.0.1
12.0.2
12.0.3
12.0.4
12.0.5
12.1.0
12.1.1
12.1.2
itemssource-checkpoint1
itemssource-checkpoint2
nuget-0.7.1.5
nuget-0.7.1.6
nuget-release-0.5.1
nuget-release-0.6.0
nuget-release-0.6.1
${ item.name }
${ noResults }
72 Commits (fixes/macos-owned-window-level-inheritance)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
082a03b7c4
|
Handle DataValidationError notifications returned by ConvertBack (#22171)
* Handle DataValidationError notifications returned by ConvertBack A converter returning a BindingNotification with DataValidationError fell through to the target type converter, which replaced it with a cast error that stringified the notification. Publish the original error instead. * Add additional failing tests. There are more `BindingNotification` cases to handle. * Handle the other `BindingNotification` cases. --------- Co-authored-by: grokys <grokys@users.noreply.github.com> |
6 days ago |
|
|
fedb14ce85
|
Short-circuit a null-conditional operator after a cast (#22174)
Follow-up to #22082, which added the short-circuit to the property accessor nodes. The cast nodes still called ValidateNonNullSource, so a cast reported "Value is null" before the following ?. could suppress it. Casting null now produces null, as in C#, leaving any error to the member access that follows. |
1 week ago |
|
|
8057428233
|
Allow casting to a nested type in a binding path (#22173)
The binding path parser built type names with ParseIdentifier, which doesn't accept '+', so a cast like ((local:Outer+Nested)DataContext) stopped parsing at the '+' and then failed expecting a ')'. Parse type names with a variant that accepts '+'. Ordinary identifiers are unchanged. |
1 week ago |
|
|
31d6979377
|
Fix data validation errors not showing for OneWayToSource bindings (#22103)
* Add failing tests for OneWayToSource validation (#8235) Data validation errors from validation attributes (e.g. [MaxLength]) and INotifyDataErrorInfo are not displayed when binding with Mode=OneWayToSource. Add tests covering both the DataAnnotations and INDEI cases when writing to the source. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013gwdaykrFyoMZFeVmWMydb * Publish data validation errors for OneWayToSource bindings (#8235) In OneWayToSource mode, BindingExpression.OnNodeValueChanged discarded any data validation error produced when writing the value to the source, so validation attributes and INotifyDataErrorInfo errors were never displayed. Publish (and clear) the error via UnchangedValue so that the error state reaches the target without pushing a value back to it, preserving the one-way-to-source semantics. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013gwdaykrFyoMZFeVmWMydb * Added passing test for #15378. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
2 weeks ago |
|
|
7527557ca0
|
Short-circuit the binding chain on a null-conditional operator (#22082)
* Add failing test for issue described in #22069. https://github.com/AvaloniaUI/Avalonia/pull/22069#issuecomment-5442287978 * Add failing test for #18949. * Add failing tests for null conditional on attached property. * Short-circuit the binding chain on a null-conditional operator. The null-conditional operator in a binding path was only applied to the node it was attached to: a null source produced a null value which was then passed to the next node in the chain, which raised "Value is null.". C# instead short-circuits the remainder of the expression, so `a?.b.c` evaluates to null when `a` is null. Do the same for binding paths. When a null-conditional node has a null source it now sets its own value and that of all subsequent nodes to null, and the binding publishes null rather than an error. Publishing null rather than UnsetValue means TargetNullValue still applies. Attached properties in reflection bindings never honoured the operator at all: the grammar parses `?.(Foo.Bar)` and sets AttachedPropertyNameNode.AcceptsNull, but ExpressionNodeFactory discarded the flag and AvaloniaPropertyAccessorNode had no way to accept it. Pass it through. Compiled bindings were unaffected as they route attached properties through PropertyAccessorNode. Fixes #18949. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Atuuu4jtp14QXXoCzkp2A6 * Add TargetNullValue tests for short-circuited chains. Covers `A?.B.C` where A is null, for both CLR and Avalonia properties. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aahFHMmgxZtZ5EH3H5Xcc --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
3 weeks ago |
|
|
15a9c99fc6
|
Add typed binding expressions (#21552)
* 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.
|
3 weeks ago |
|
|
82dc3b56c1
|
Support {Binding ^} pattern for IObservable DataContext (#21812)
Previously {Binding ^} was not parsed because ParseStart did not
recognize the ^ stream operator. Also, {Binding .^} failed because
ParseDot returned State.End immediately, preventing subsequent
operators.
Changes:
- ParseStart: recognize ^, emit EmptyExpressionNode + StreamNode
- ParseDot: return State.AfterMember instead of State.End, so .^ works
- Add grammar tests for ^ and .^ patterns
|
2 months ago |
|
|
c3a5c49699
|
fix(binding): reapply cached source values during UpdateTarget (#21756)
* Added failing test for #21746. * fix(binding): reapply cached source values during UpdateTarget UpdateTarget did not restore an uncommitted explicit two-way target value when the source still matched the binding expression's cached value. Equal-value suppression then prevented ValueStore from receiving the refresh.\n\nTrack the synchronous UpdateTarget rebuild and force publication only for that path, so the source value is reapplied without changing normal binding notification deduplication. The preceding regression test covers the observable behavior in both reflection and compiled binding paths. --------- Co-authored-by: grokys <grokys@users.noreply.github.com> |
2 months ago |
|
|
17c88145ee
|
Fix #17674: OneWay binding fails to update target after local change (#20964)
* Fix #20816: OneWay binding fails to update target after local change When a OneWay binding target is modified locally (e.g., via user interaction on a ToggleButton), subsequent PropertyChanged events from the source were being ignored. This occurred because the binding expression incorrectly suppressed the update. This patch modifies UntypedBindingExpressionBase to ensure that OneWay bindings always propagate changes from the source to the target, overriding any previous local changes. Unit tests were also added to prevent future regressions on this behavior. Signed-off-by: Martim Claudino <martimffclaudino@tecnico.ulisboa.pt> * fix: scope forceUpdate to OneWay mode, use SetCurrentValue in tests and clean usings Signed-off-by: Martim Claudino <martimffclaudino@tecnico.ulisboa.pt> --------- Signed-off-by: Martim Claudino <martimffclaudino@tecnico.ulisboa.pt> |
5 months ago |
|
|
c62e1dffff
|
Fix TextBox validation error persisting when reverting to same valid value (#20780)
* Fix TextBox validation error persisting when reverting to same valid value When a TwoWay binding with validation had an error and the user set the target back to the same value that was last successfully written to the source, WriteTargetValueToSource() would bail out early because the target value matched LeafNode.Value. This prevented WriteValueToSource() from being called, so the validation error was never cleared. Add an ErrorType check to the condition in WriteTargetValueToSource() so that the write-through still happens when there is a pending validation error, matching the pattern already used in WriteValueToSource() at line 310. Fixes #20534 https://claude.ai/code/session_01LTinLuE1bsNKaLPuDSNuuw * Add test for validation error clearing when reverting to same valid value Reproduces the scenario from #20534 where a TwoWay binding with a setter that throws on invalid values fails to clear the validation error when the target is set back to the same value that was last successfully written to the source. https://claude.ai/code/session_01LTinLuE1bsNKaLPuDSNuuw * Remove redundant checks in WriteTargetValueToSource() |
7 months ago |
|
|
d9a6ae517f
|
Hide binding plugins and disable Data Annotations validation by default (#20623)
* 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> |
7 months ago |
|
|
70f3bef705
|
Add CompiledBinding.Create factory methods from LINQ expressions (#20443)
* Reminder for future me. * Move compiled bindings to Avalonia base. * Update suppressions. * Tweaked `BindingExpressionVisitor`. And documented public (internal) API. * Fix ncrunch config. * Add comprehensive unit tests for BindingExpressionVisitor. Tests cover all supported features including property access, indexers, AvaloniaProperty access, logical NOT, stream bindings, and type operators. Also includes tests for unsupported operations that should throw exceptions. Discovered bug: IsAssignableFrom check at line 139 is backwards, causing upcasts to incorrectly throw and downcasts to be incorrectly ignored. Bug is documented with skipped tests showing expected behavior and passing tests documenting current broken behavior. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Fix backwards IsAssignableFrom check in BindingExpressionVisitor. Fixed the inheritance cast check which was inverted, causing: - Upcasts (derived→base) to incorrectly throw exceptions - Downcasts (base→derived) to be incorrectly ignored Changed line 139 from: node.Operand.Type.IsAssignableFrom(node.Type) to: node.Type.IsAssignableFrom(node.Operand.Type) This correctly identifies safe upcasts (which are ignored) vs unsafe downcasts (which throw exceptions). Updated tests to remove skip attributes and removed the temporary tests that documented the broken behavior. All 33 tests now pass. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Allow downcasts and all reference type casts in binding expressions. Changed the cast handling to allow both upcasts and downcasts for reference types. This makes casts actually useful in binding expressions while still rejecting value type conversions that would require actual conversion logic. The logic now checks: - Both types must be reference types (not value types) - One type must be assignable to/from the other (either direction) This allows practical scenarios like: - Upcasts: (BaseClass)derived - Downcasts: (DerivedClass)baseInstance - Casting through object: (TargetType)(object)source The binding system will gracefully handle any runtime type mismatches. Updated tests to verify downcasts are allowed and added test for casting through object pattern. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Add clarifying test for cast transparency in binding expressions. Added test showing that casts are transparent in property chains. For example, ((TestClass)x).Property produces just one node for the property access - the cast doesn't create additional nodes. This clarifies that empty nodes for (TestClass)x is correct behavior: - Empty nodes = bind to source directly - The cast is just a type annotation, transparent to the binding path Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Fix: Casts should create ReflectionTypeCastNode, not be transparent. Casts were incorrectly being treated as transparent (not creating nodes), but CompiledBindingPath uses TypeCastPathElement which creates FuncTransformNode. For consistency and correctness, BindingExpressionVisitor should also create cast nodes using ReflectionTypeCastNode. Changes: - Convert expressions now create ReflectionTypeCastNode - TypeAs expressions now create ReflectionTypeCastNode - Both upcasts and downcasts create nodes (runtime checks handle failures) Examples: - x => (TestClass)x → 1 node (cast) - x => ((TestClass)x).Prop → 2 nodes (cast + property) - x => x.Child as object → 2 nodes (property + cast) This matches the behavior of CompiledBindingPathBuilder.TypeCast<T>(). Updated all related tests to verify cast nodes are created. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Use compiled cast functions instead of reflection-based type checks. Changed from ReflectionTypeCastNode (which uses Type.IsInstanceOfType) to FuncTransformNode with a compiled cast function. This matches how CompiledBindingPath handles TypeCastPathElement and provides better performance by avoiding reflection. The CreateCastFunc method compiles an expression `(object? obj) => obj as T` which generates efficient IL similar to the 'is T' pattern used in TypeCastPathElement<T>, rather than using reflection-based type checks. Performance improvement: - Before: Type.IsInstanceOfType() reflection call for each cast - After: Compiled IL using 'as' operator (same as TypeCastPathElement<T>) Updated tests to expect FuncTransformNode instead of ReflectionTypeCastNode. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Reuse TypeCastPathElement<T> cast function directly. Instead of compiling our own cast expression, extract the Cast delegate directly from TypeCastPathElement<T>. This ensures we use the exact same code path as CompiledBindingPath, avoiding any potential behavioral differences and code duplication. Benefits: - Code reuse - single implementation of cast logic - Consistency - same behavior as CompiledBindingPathBuilder.TypeCast<T>() - No duplicate expression compilation logic Implementation uses reflection to create the closed generic type and extract the pre-compiled Cast delegate, which is still more efficient than reflection-based type checks at runtime. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Revert to lambda compilation approach for cast functions. Reverted from using TypeCastPathElement<T> back to compiling lambda expressions directly. The lambda approach is cleaner and more straightforward: Benefits of lambda compilation: - No Activator.CreateInstance call (avoids reflection for construction) - More direct - creates exactly what we need - No coupling to TypeCastPathElement internal implementation - Simpler code flow The compiled lambda generates the same efficient IL code (using 'as' operator) as TypeCastPathElement<T> does, just without the indirection. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Code cleanup: Fix XML docs and remove unused usings. - Changed CreateCastFunc XML docs to use <remarks> tag for better formatting - Removed unused 'using Avalonia.Data;' from tests - Removed redundant '#nullable enable' from tests Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Refactor BindingExpressionVisitor to use CompiledBindingPathBuilder. Changes BindingExpressionVisitor to use CompiledBindingPathBuilder instead of directly creating ExpressionNode instances, unifying the approach with compile-time XAML bindings. Adds new BuildPath() method that returns CompiledBindingPath, while maintaining backwards compatibility through the existing BuildNodes() wrapper method. Key changes: - Replace internal List<ExpressionNode> with CompiledBindingPathBuilder - Refactor all visitor methods to call builder methods - Add accessor factory methods and implementations for property access - Support AvaloniaProperty, CLR properties, arrays, indexers, streams, casts - Update tests to expect PropertyAccessorNode, StreamNode, ArrayIndexerNode Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Remove CompiledBindingPathFromExpressionBuilder in favor of BindingExpressionVisitor. Now that BindingExpressionVisitor has been refactored to use CompiledBindingPathBuilder and provides a BuildPath() method, the test-only CompiledBindingPathFromExpressionBuilder class is redundant and can be removed. Changes: - Replace CompiledBindingPathFromExpressionBuilder.Build() with BindingExpressionVisitor<TIn>.BuildPath() in BindingExpressionTests - Delete CompiledBindingPathFromExpressionBuilder.cs test file - All 122 tests in BindingExpressionTests.Compiled continue to pass Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Move test-only methods from production code to test extensions. Removes BindingExpression.Create and BindingExpressionVisitor.BuildNodes from production code since they were only used by unit tests. Changes: - Remove BindingExpression.Create<TIn, TOut> method - Remove BindingExpressionVisitor.BuildNodes method - Add BindingExpressionVisitorExtensions in Base.UnitTests - Add BindingExpressionExtensions in LeakTests - Add static helper methods in test classes to reduce noise Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Add public CompiledBinding.Create factory methods from LINQ expressions. Adds two static factory methods to create CompiledBinding instances from lambda expressions using BindingExpressionVisitor.BuildPath(): - Create<TIn, TOut>(expression, converter, mode) Creates binding without explicit source (uses DataContext) - Create<TIn, TOut>(source, expression, converter, mode) Creates binding with explicit source This provides a type-safe, ergonomic API for creating compiled bindings from code without string-based paths. Usage: var binding = CompiledBinding.Create(viewModel, vm => vm.Title); textBlock.Bind(TextBlock.TextProperty, binding); Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Merge CompiledBinding.Create overloads and add all binding property parameters. Consolidates the two Create method overloads into a single method with source as an optional parameter. Adds optional parameters for all CompiledBinding properties (priority, converterCulture, converterParameter, fallbackValue, stringFormat, targetNullValue, updateSourceTrigger, delay) per PR feedback. Properties that default to AvaloniaProperty.UnsetValue (source, fallbackValue, targetNullValue) use null-coalescing to convert null parameter values. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * (Re-)update suppressions. * Add missing using. * Fix ncrunch build. * Remove file I committed by accident. * PR feedback. * Store static members outside generic class. Based on PR feedback. --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> |
7 months ago |
|
|
1086d9b5b0
|
Move compiled bindings to Avalonia.Base. (#20439)
* Reminder for future me. * Move compiled bindings to Avalonia base. * Update suppressions. * Update API suppressions --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net> |
8 months ago |
|
|
5d3a9c167a
|
Fix BindingExpression.LeafNode throwing when nodes list is empty (#20442)
Make LeafNode property nullable and return null when the binding expression has no nodes (e.g., when using a constant source with a converter but no path). This fixes an ArgumentOutOfRangeException that occurred when accessing LeafNode or Description properties on such bindings. Fixes #20441 Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> |
8 months ago |
|
|
c9e210eb70
|
Update to xunit.v3 (#20331)
* Update to xunit.v3 * Little more progress * More fixes * Keep VSTest supported * Adjust Nuke * Few fixes * Fix for xunit 2 * Fix GetData override * Adjust * Use MTP for xunit 2 * Fix test * Better fix * --no-progress * Few more fixes * no progress * Fix test * Better fix * TRX * Move to Directory.Build.props * Unify on MTP v2 * Update * Update to stable * 1.0.1 * 1.0.2 * Fix some warnings * Fix more warnings * Fix more warnings |
8 months ago |
|
|
f2fc8d02f4
|
Move `IBinding` to `BindingBase` and tidy up some binding APIs (#19589)
* Update ncrunch config. * Tidy up reflection and multi-binding APIs: - Move `BindingBase` and `MultiBinding` into Avalonia.Base - `BindingBase` becomes a true base class for all bindings, and contains only the `Instance` method - Properties common between reflection and compiled bindings are moved into `StandardBindingBase` - `Binding` is moved to Avalonia.Base and renamed to `ReflectionBinding` - A compatibility shim for `Binding` remains in Avalonia.Markup - Remove `IBinding` and `IBinding2` - Remove `ITreeDataTemplate's usage of `InstancedBinding` - Remove `NativeMenuBarPresenter`s usage of `InstancedBinding` - Remove `InstancedBinding` as it is now unused This required an update to the DataGrid submodule: cell data validation has been temporarily removed as this used `InstancedBinding`. * `Instance()` => `CreateInstance()`. The use of "Instance" as a verb is quite unusual apparently ;) * Seal classes where appropriate. * Seal classes where appropriate. * Remove `StandardBindingBase`. Simply duplicate the members in reflection and compiled binding classes. * Delete deleted submodule directory. * Add missing attribute. Fixes compile error. * Fix reference to removed class. * Update suppressions. |
8 months ago |
|
|
c68111294f
|
Enable nullability in Base/Markup/Markup.Xaml unit tests (#20346)
* Enable nullability in UnitTests * Enable nullability in Base.UnitTests * Enable nullability in Markup.UnitTests * Enable nullability in Markup.Xaml.UnitTests |
9 months ago |
|
|
21a38e81c4
|
Fix validation error not being cleared on valid input (#19477)
* Add failing test for binding error not being cleared, when bound value does not change * Fix clearing binding error |
1 year ago |
|
|
c3f02518e5
|
Fix binding null conditional operator not working with AvaloniaProperty (#18583)
* Add failing tests for null conditional operator with AvaloniaPropery * Fix null conditional operator with AvaloniaProperty |
1 year ago |
|
|
fb5121a42f
|
Null conditional operator in bindings (#18270)
* Update ncrunch config. * Fix test naming. * Add BindingExpressionGrammar tests. We only had tests for the error states, and that was named incorrectly. * Parse null-conditionals in bindings. * Initial impl of null conditionals in binding path. Fixes #17029. * Ensure that nothing is logged. * Make "?." work when binding to methods. * Don't add a new public API. And add a comment reminding us to make this class internal for 12.0. * Use existing method. |
2 years ago |
|
|
9d03a01afa
|
Made OneTime bindings update on DataContext changes (#17683)
* Add failing tests for OneTime and null data context bindings * Made OneTime bindings update on DataContext changes Also allows null as a valid value for bindings without path * Remove now obsolete test |
2 years ago |
|
|
20f77a3490
|
Fix bindings without property path (#16729)
* Added failing binding tests * Fix bindings without property path --------- Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com> |
2 years ago |
|
|
6b0f09a372
|
Make bindings react to PropertyChanged even if property hasn't changed (#16150)
* Added failing test for #16137. * Raise node change even if value hasn't changed. Fixes #16137. |
2 years ago |
|
|
5e323b8fb1
|
Allow nested BindingNotifications. (#15722)
* Added failing test for #15201. * Handle nested BindingNotifications. When #13970 was written, [a check](https://github.com/AvaloniaUI/Avalonia/pull/13970/files#diff-cfb25a491b9452e1815aa2c0d71465aaf81e99792a88a04a1a2ed572fd1930ffR60) was added to ensure that nested `BindingNotification`s didn't happen, and the refactor was written with the assumption that they wouldn't happen. The problem is that they _do_ happen: when a source object implements both `INotifyDataErrorInfo` and had data annotations, then the nested data validation plugins would each wrap the value coming from the previous plugin in a new `BindingNotification`, resulting in nested `BindingNotifications`. This adds support for nested binding notifications back in - even though IMO nesting binding notifications is a bug, if we're doing it and we previously supported it then we should continue to support it. Fixes #15201 |
2 years ago |
|
|
8fe6e08020
|
Fixes spurious DataGrid data validation error (#15716)
* Added failing tests for #15081. * Provide target property in BindingExpression ctor. Usually it is not necessary to provide the target property when creating a `BindingExpression` because the property will be assigned when the binding expression is attached to the target in `BindingExpressionBase.Attach`. This is however one case where `Attach` is not called: when the obsolete `binding.Initiate` method is called and then an observable is read from the `InstancedBinding` without the binding actually being attached to the target object. In this case, prior to the binding refactor in #13970 the value produced by the observable was still converted to the target type. After #13970, because the target property (and hence the target type) is not yet set, the conversion is to the target type is no longer done. `DataGrid` uses this obsolete method when editing cells, causing #15081. Ideally we'd fix that in `DataGrid` but I'm not happy making this change so close to 11.1, so instead fix this use-case to behave as before. Fixes #15081 |
2 years ago |
|
|
cac27ddfc0
|
Misc warning fixes (#14766)
* Fix XML doc warnings * Fix nullability warnings * Fix misc warnings |
3 years ago |
|
|
f6fe68eddb
|
Fix OneWayToSource bindings with read-only properties. (#14513)
* Added more OneWayToSource tests. One of whom is failing. * Don't public value for OneWayToSource bindings. Looks to have been a brainfart. This allows `OneWayToSource` bindings to read-only properties. |
3 years ago |
|
|
3b1eb338e6
|
Binding System refactor (#13970)
* Update ncrunch config.
* WIP: Benchmarks
* Initial refactor of binding infrastructure.
- `ExpressionObserver` has been removed and its functionality merged with `BindingExpression`
- `BindingExpression` handles all types of `BindingMode` itself; doesn't require `BindingOperations.Apply` to set up a separate observable for `TwoWay/`OneWayToSource` bindings
- This allows us to fix some long-standing issues with `OneWayToSource` bindings
- Expression nodes have been refactored
- No longer split between `Avalonia.Base` and `Avalonia.Markup`
- Categorize them according to whether they use reflection or not
A few tests are failing around binding warnings: this is because the next step here is to fix binding warnings.
* Make default binding Source = UnsetProperty.
Null is a theoretically valid value for `Source`; setting it to null shouldn't mean "use the data context".
* Move logging to BindingExpression.
As `BindingExpression` now has enough information to decide when it's appropriate to log an error/warning or not.
Fixes #5762
Fixes #9422
* Add compatibility hack for older compiled bindings.
Previously, `CompiledBindingPathBuilder` didn't have a `TemplatedParent` method and instead the XAML compiler rewrite templated parent bindings to be a `$self.TemplateParent` property binding. resulting in extraneous logs.
Add a constructor with an `apiVersion` to `CompiledBindingPathBuilder` which will be used by newer versions of the XAML compiler, and if a usage is detected using an `apiVersion` of 0, then upgrade `$self.TemplatedParent` to use a `TemplatedParentPathElement`.
* Log errors from property accessors.
* Don't log errors for named control bindings...
...on elements which aren't yet rooted.
* Log errors for failed conversions.
* Use consistent wording for binding warnings.
"Could not convert" instead of "Cannot convert".
* Log warnings for converter exceptions.
* Don't convert new TargetTypeConverters each time.
* Added failing test for implicit conversion.
* Support cast operators in compiled bindings.
A bit of a hack as we'd ideally not be using reflection when using compiled bindings.
* This shouldn't be a public API.
Should only be used for tests.
* Make enum/int conversion work.
* Check for SetValue equality after conversion.
And also use "identity equals" where value types and strings use `object.Equals` and reference types use `object.ReferenceEquals`.
* Added ConverterCulture back to bindings.
* Fix merge error.
Removed deleted files from csproj that were re-added due to indentation changes.
* Use BindingExpression directly in ValueStoe.
* Introduce BindingExpressionBase.
And `UntypedBindingExpressionBase`.
* Make TemplateBinding a BindingExpression.
* Make DynamicResource use a BindingExpression.
* WIP: Start exposing a BindingExpression API.
* Finish exposing a BindingExpression API.
* Fix OneTimeBinding.
* Remove unneeded classes/methods.
* Don't call obsolete API.
* Make BindingExpressionBase the public API.
This matches WPF's API.
* Added BindingExpressionBase.UpdateTarget.
* Initial implementation of UpdateSourceTrigger.
* Don't use weak references for values.
If they're boxed values, they can get collected.
* No need for virtual/generic methods here now.
* Reintroduce support for binding anchors.
Turns out these were needed by animations, just our animation system has no unit tests so I missed that fact earlier. Add a basic animation unit test that fails without anchor support, and add binding anchors back in. Currently a private API as I suspect this feature shouldn't be needed outside the framework.
* Include new property in clone.
And add real-life example of `UpdateSourceTrigger=LostFocus` to BindingDemo.
* Fix merge error.
* Updated BindingExpression tests.
- Make them run for both compiled and reflection bindings (found a bunch of tests that fail with compiled bindings)
- Make them not depend on converting the `BindingExpression` to an observable and instead test the end result of the binding on an `AvaloniaObject`
* Fix compiled binding indexer tests.
* Use data validation plugins in PropertyAccessorNode.
Added a warning suppression for now: we may need a separate `DataValidators` list for AOT-friendly plugins.
* Don't separate plugins by reflection.
`DataAnnotationsValidationPlugin` is public and so it can't be moved. No point in moving the others if this one will be in the wrong place.
* Remove unneeded methods.
* Make reflection binding tests use a string.
Convert the `System.Linq.Expression` to a string and then use this, as reflection bindings will always be instanced with a string path.
* Added TODO12 plan for IBinding2.
* Use more specific exception.
* Fix nits from code review.
* Make expression nodes sealed where possible.
* Unsubscribe on Stop, don't re-subscribe.
D'oh.
* Tweak ExpressionNode lists.
Saves a few K in benchmarks and it's a cleaner API.
* Add a pooled option in BindingExpressionGrammar.
Micro-optimization.
* Avoid allocations when enumerating binding plugins.
* Add IBinding2 support to observable bind overloads.
In the case of `TemplateBinding`, the `IObservable<object?>` bind overload is selected by C#. Add an explicit check for an `IBinding2` here to use the more performant code-path.
* Remove disposed binding from ImmediateBindingFrame.
* Added TemplateBinding benchmarks.
* Remove duplicate items.
Seems to have been caused by a merge error.
* Fix exception when closing color picker.
And add tests.
* Don't skip converter when binding to self.
* Don't pass UnsetValue to converters.
This follows WPF behavior.
* Log element name if present.
More useful than just logging the control hash code.
* Respect binding priority.
* Throw on mismatched binding priorities.
We don't want to respect the binding priority in this case as it breaks `TemplateBindings` when the default `LocalValue` priority is passed. Instead make sure that the priority parameter matches that of the expression.
This reverts commit
|
3 years ago |
|
|
e6c1670421
|
Fix unit tests culture (#13016)
|
3 years ago |
|
|
8948aa7e52
|
Added ConverterCulture to bindings. (#12876)
Similar to WPF's `Binding.ConverterCulture` property. |
3 years ago |
|
|
796722f319 |
Never convert null to UnsetValue in bindings
Revert ToggleButton.IsChecked hack |
4 years ago |
|
|
a78b0edd42 |
Changes after review
|
4 years ago |
|
|
dba476c11c |
fix more typos
|
4 years ago |
|
|
59d7874b1d |
Replace System.Reactive with internal extensions
|
4 years ago |
|
|
b5891a2ead |
Fix bug in ExpressionObserver.
Ensure `rootGetter` is evaluated each time the observer is initialized; plus failing and now passing test. |
4 years ago |
|
|
de4b55f8ee |
feat(tests): Address rule CA1822
|
4 years ago |
|
|
fb0da85ad3
|
Merge core libraries. (#5831)
* Merge core libraries. Everything below `Avalonia.Controls` into `Avalonia.Base`. * Move new files to correct place. * Removed unused dirs/projects, * Removed outdated references from theme assemblies. * Merge unit tests to match new assembly layout. * Fixup test namespaces. * Make directory match namespace. * Move files to match namespace. * Move files to match namespace. * Fix up incorrect namespace. `Avalonia.Visuals.Media.Imaging` -> `Avalonia.Media.Imaging`. * Fix resource URL. * Removed outdated dependencies. * Added missing project reference. * Update test namespaces. * Fix merge error. * Fix merge errors. * Fix bad merge in WindowsInteropTest.csproj. * Fix up merge errors in csprojs. * Remove merged tests from nuke. * Fix up namespace. * Fix compile error. * Fix failing tests. Now that more unit tests are present in Avalonia.Base.UnitTests, general `AvaloniaObject` properties are getting registered. Ignore those. Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com> |
4 years ago |
|
|
f010322a06 |
Force compacting WeakEvent subscriber list in before assertions in tests
|
5 years ago |
|
|
c98918bc2a |
Update tests
|
6 years ago |
|
|
00dbf12cee |
Remove not needed code.
|
6 years ago |
|
|
8555fed86b |
Add failing tests for #4733 and fix property accessor.
|
6 years ago |
|
|
f3e0863f52 |
Updated exception type for validation exceptions so that DataValidationErrors can extract the user friendly message.
|
6 years ago |
|
|
178a1aeb19 |
Add failing unit test.
|
6 years ago |
|
|
3b7d8574e8 |
Try matching for INPC before matching methods.
|
6 years ago |
|
|
4d01dacd77 |
Remove copyright headers.
Some of our files had them, some didn't. They serve no purpose legally so best to remove the ceremony. |
7 years ago |
|
|
1ba4c68a35
|
Implemented TargetNullValue for bindings.
|
7 years ago |
|
|
6be3acb46c |
Make ValueStore typed.
Major refactor of the Avalonia core to make the styled property store typed. |
7 years ago |
|
|
6dbe617ed6 |
One more tests fix
|
7 years ago |
|
|
868b5ea840 |
Update WeakReference usages to use the generic one.
|
7 years ago |
|
|
048660ed8b |
Implemented PropertyPathGrammar
|
7 years ago |