Repository navigation
[Exploration] Typed BindableProperty<T> and unboxed BindableObject storage - #40798
simonrozsival wants to merge 34 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/review expert-review |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Superseded by the source-only comparison charts now embedded in the PR description. See the updated tables and charts above. |
|
The performance section was condensed and the selected charts are now embedded in the PR description. This earlier chart gallery is superseded. |
|
/review expert-review |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Superseded: the final comparisons and updated charts are in the pull request description. |
|
/review expert-review |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Expert Review — 6 findings · ⚠️ 1 breaking change
Reviewed commit d85d5a3.
Warning
Existing apps would look or behave differently without opting in. See the Behavioral Change Disclosure findings at:
See inline comments for details.
…d context Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… BP, typed callbacks Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…yped set core Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Built-in properties keep their public BindableProperty field type but are backed by BindableProperty<T>.CreateCompatible, which stores values unboxed while object writes keep converting. Bool boxes and coerce boxes keep their identity. Benchmarks install an inline dispatcher. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…lement pending set OnBindablePropertySet is split into non-virtual object/typed notifiers plus OnBindablePropertySetStarting/Completed hooks, so typed callbacks get unboxed values directly. Element tracks the pending handler update in one slot and only allocates a HashSet when sets nest. Adds handler-order, nesting, DynamicResource, animation and VSM tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Expert Review — No more findings
Reviewed commit b8c28ac.
Selected Tests🧪 Test selection — click to expand
🧪 UI tests — the full suite on every platform❌ Could not queue GPT-6.2 Sol: Run the full UI suite on all four platforms, including Android Material3, because shared bindable storage and handler notifications changed. 🧪 Running — 77 categories on Android, iOS, MacCatalyst, WindowsThe complete 🧪 Device tests —
|
| Platform | Categories |
|---|---|
| Android | Controls.Accessibility, Controls.Animations, Controls.Application, Controls.Behavior, Controls.Border, Controls.BoxView, Controls.Button, Controls.CarouselView, Controls.CheckBox, Controls.CollectionView, Controls.Compatibility, Controls.ContentView, Controls.DatePicker, Controls.Dispatcher, Controls.Editor, Controls.Element, Controls.Entry, Controls.FlexLayout, Controls.FlyoutPage, Controls.Frame, Controls.Gesture, Controls.HybridWebView, Controls.Image, Controls.Label, Controls.Layout, Controls.Lifecycle, Controls.Map, Controls.Mapper, Controls.Memory, Controls.MenuFlyout, Controls.Modal, Controls.NavigationPage, Controls.Page, Controls.PageTransitions, Controls.Path, Controls.Picker, Controls.RadioButton, Controls.RefreshView, Controls.ScrollView, Controls.SearchBar, Controls.Shape, Controls.Shell, Controls.Slider, Controls.SwipeView, Controls.Switch, Controls.TabbedPage, Controls.TemplatedView, Controls.TextInput, Controls.Toolbar, Controls.View, Controls.VisualElement, Controls.VisualElementTree, Controls.WebView, Controls.Window, Controls.WindowOverlay, Controls.Xaml, Core.ActivityIndicator, Core.Animation, Core.Application, Core.Border, Core.BoxView, Core.Button, Core.CheckBox, Core.ContentView, Core.DatePicker, Core.Dispatcher, Core.Editor, Core.Element, Core.Entry, Core.FlowDirection, Core.FlyoutView, Core.Fonts, Core.Formatting, Core.Graphics, Core.GraphicsView, Core.Image, Core.ImageButton, Core.ImageSource, Core.IndicatorView, Core.Label, Core.Layout, Core.Lifecycle, Core.MauiContext, Core.Memory, Core.NavigationPage, Core.Page, Core.Picker, Core.ProgressBar, Core.RadioButton, Core.RefreshView, Core.ScrollView, Core.SearchBar, Core.ShapeView, Core.Slider, Core.Stepper, Core.SwipeView, Core.Switch, Core.TimePicker, Core.View, Core.WebView, Core.Window, Core.WindowOverlay |
| iOS | Controls.Accessibility, Controls.Animations, Controls.Application, Controls.Behavior, Controls.Border, Controls.BoxView, Controls.Button, Controls.CarouselView, Controls.CheckBox, Controls.CollectionView, Controls.Compatibility, Controls.ContentView, Controls.DatePicker, Controls.Dispatcher, Controls.Editor, Controls.Element, Controls.Entry, Controls.FlexLayout, Controls.FlyoutPage, Controls.Frame, Controls.Gesture, Controls.HybridWebView, Controls.Image, Controls.Label, Controls.Layout, Controls.Lifecycle, Controls.Map, Controls.Mapper, Controls.Memory, Controls.MenuFlyout, Controls.Modal, Controls.NavigationPage, Controls.Page, Controls.PageTransitions, Controls.Path, Controls.Picker, Controls.RadioButton, Controls.RefreshView, Controls.ScrollView, Controls.SearchBar, Controls.Shape, Controls.Shell, Controls.Slider, Controls.SwipeView, Controls.Switch, Controls.TabbedPage, Controls.TemplatedView, Controls.TextInput, Controls.Toolbar, Controls.View, Controls.VisualElement, Controls.VisualElementTree, Controls.WebView, Controls.Window, Controls.WindowOverlay, Controls.Xaml, Core.ActivityIndicator, Core.Animation, Core.Application, Core.Border, Core.BoxView, Core.Button, Core.CheckBox, Core.ContentView, Core.DatePicker, Core.Dispatcher, Core.Editor, Core.Element, Core.Entry, Core.FlowDirection, Core.FlyoutView, Core.Fonts, Core.Formatting, Core.Graphics, Core.GraphicsView, Core.Image, Core.ImageButton, Core.ImageSource, Core.IndicatorView, Core.Label, Core.Layout, Core.Lifecycle, Core.MauiContext, Core.Memory, Core.NavigationPage, Core.Page, Core.Picker, Core.ProgressBar, Core.RadioButton, Core.RefreshView, Core.ScrollView, Core.SearchBar, Core.ShapeView, Core.Slider, Core.Stepper, Core.SwipeView, Core.Switch, Core.TimePicker, Core.View, Core.WebView, Core.Window, Core.WindowOverlay |
| MacCatalyst | Controls.Accessibility, Controls.Animations, Controls.Application, Controls.Behavior, Controls.Border, Controls.BoxView, Controls.Button, Controls.CarouselView, Controls.CheckBox, Controls.CollectionView, Controls.Compatibility, Controls.ContentView, Controls.DatePicker, Controls.Dispatcher, Controls.Editor, Controls.Element, Controls.Entry, Controls.FlexLayout, Controls.FlyoutPage, Controls.Frame, Controls.Gesture, Controls.HybridWebView, Controls.Image, Controls.Label, Controls.Layout, Controls.Lifecycle, Controls.Map, Controls.Mapper, Controls.Memory, Controls.MenuFlyout, Controls.Modal, Controls.NavigationPage, Controls.Page, Controls.PageTransitions, Controls.Path, Controls.Picker, Controls.RadioButton, Controls.RefreshView, Controls.ScrollView, Controls.SearchBar, Controls.Shape, Controls.Shell, Controls.Slider, Controls.SwipeView, Controls.Switch, Controls.TabbedPage, Controls.TemplatedView, Controls.TextInput, Controls.Toolbar, Controls.View, Controls.VisualElement, Controls.VisualElementTree, Controls.WebView, Controls.Window, Controls.WindowOverlay, Controls.Xaml, Core.ActivityIndicator, Core.Animation, Core.Application, Core.Border, Core.BoxView, Core.Button, Core.CheckBox, Core.ContentView, Core.DatePicker, Core.Dispatcher, Core.Editor, Core.Element, Core.Entry, Core.FlowDirection, Core.FlyoutView, Core.Fonts, Core.Formatting, Core.Graphics, Core.GraphicsView, Core.Image, Core.ImageButton, Core.ImageSource, Core.IndicatorView, Core.Label, Core.Layout, Core.Lifecycle, Core.MauiContext, Core.Memory, Core.NavigationPage, Core.Page, Core.Picker, Core.ProgressBar, Core.RadioButton, Core.RefreshView, Core.ScrollView, Core.SearchBar, Core.ShapeView, Core.Slider, Core.Stepper, Core.SwipeView, Core.Switch, Core.TimePicker, Core.View, Core.WebView, Core.Window, Core.WindowOverlay |
| Windows | Controls.Accessibility, Controls.Animations, Controls.Application, Controls.Behavior, Controls.Border, Controls.BoxView, Controls.Button, Controls.CarouselView, Controls.CheckBox, Controls.CollectionView, Controls.Compatibility, Controls.ContentView, Controls.DatePicker, Controls.Dispatcher, Controls.Editor, Controls.Element, Controls.Entry, Controls.FlexLayout, Controls.FlyoutPage, Controls.Frame, Controls.Gesture, Controls.HybridWebView, Controls.Image, Controls.Label, Controls.Layout, Controls.Lifecycle, Controls.Map, Controls.Mapper, Controls.Memory, Controls.MenuFlyout, Controls.Modal, Controls.NavigationPage, Controls.Page, Controls.PageTransitions, Controls.Path, Controls.Picker, Controls.RadioButton, Controls.RefreshView, Controls.ScrollView, Controls.SearchBar, Controls.Shape, Controls.Shell, Controls.Slider, Controls.SwipeView, Controls.Switch, Controls.TabbedPage, Controls.TemplatedView, Controls.TextInput, Controls.Toolbar, Controls.View, Controls.VisualElement, Controls.VisualElementTree, Controls.WebView, Controls.Window, Controls.WindowOverlay, Controls.Xaml, Core.ActivityIndicator, Core.Animation, Core.Application, Core.Border, Core.BoxView, Core.Button, Core.CheckBox, Core.ContentView, Core.DatePicker, Core.Dispatcher, Core.Editor, Core.Element, Core.Entry, Core.FlowDirection, Core.FlyoutView, Core.Fonts, Core.Formatting, Core.Graphics, Core.GraphicsView, Core.Image, Core.ImageButton, Core.ImageSource, Core.IndicatorView, Core.Label, Core.Layout, Core.Lifecycle, Core.MauiContext, Core.Memory, Core.NavigationPage, Core.Page, Core.Picker, Core.ProgressBar, Core.RadioButton, Core.RefreshView, Core.ScrollView, Core.SearchBar, Core.ShapeView, Core.Slider, Core.Stepper, Core.SwipeView, Core.Switch, Core.TimePicker, Core.View, Core.WebView, Core.Window, Core.WindowOverlay |
⏭️ Skipped — what neither suite runs
Device tests — 3 categories, 0 platforms
Categories not run: Graphics, Essentials, BlazorWebView
Each skipped platform and project is listed as a maui-pr-devicetests (skipped) … status on this commit. Use /azp run maui-pr-devicetests for the full suite.
🤖 Why these tests — AI rationale (GPT-6.2 Sol + MAI Code 2)
UI tests
Each model chose independently; every test that runs was selected by at least one of them.
| Platform | GPT-6.2 Sol | MAI Code 2 |
|---|---|---|
| Android | all categories | all categories |
| iOS | all categories | all categories |
| MacCatalyst | all categories | all categories |
| Windows | all categories | all categories |
GPT-6.2 Sol — Run the full UI suite on all four platforms, including Android Material3, because shared bindable storage and handler notifications changed.
- BindableObject, Element, View and VisualElement change shared binding, mapper updates and layout inputs.
- Button and Label font and padding changes warrant Android Material3.
- The Windows TextBox edit is comment-only; no separate lane is needed.
MAI Code 2 — Typed bindable-property storage changes cross-platform BindableObject, View, VisualElement, and layout internals, requiring the full UI suite on all platforms.
- BindableObject and BindableProperty gain a new typed storage path used throughout the controls runtime, changing set/get, conversion, bindings, styling, and notification behavior.
- View, VisualElement, Layout/Grid, font/padding, and multiple adopted controls migrate core properties to typed storage, giving the change broad cross-platform UI impact.
- Typed binding and source-generation integration can affect XAML and binding-driven UI behavior beyond the individually changed controls.
- The full run is intentional because the base bindable/layout infrastructure and Element/VisualElement hierarchy are changed.
Device tests
Each model chose independently; every test that runs was selected by at least one of them.
| Platform | GPT-6.2 Sol | MAI Code 2 |
|---|---|---|
| Android | Controls.Accessibility, Controls.Animations, Controls.Application, Controls.Behavior, Controls.Border, Controls.BoxView, Controls.Button, Controls.CarouselView, Controls.CheckBox, Controls.CollectionView, Controls.Compatibility, Controls.ContentView, Controls.DatePicker, Controls.Dispatcher, Controls.Editor, Controls.Element, Controls.Entry, Controls.FlexLayout, Controls.FlyoutPage, Controls.Frame, Controls.Gesture, Controls.HybridWebView, Controls.Image, Controls.Label, Controls.Layout, Controls.Lifecycle, Controls.Map, Controls.Mapper, Controls.Memory, Controls.MenuFlyout, Controls.Modal, Controls.NavigationPage, Controls.Page, Controls.PageTransitions, Controls.Path, Controls.Picker, Controls.RadioButton, Controls.RefreshView, Controls.ScrollView, Controls.SearchBar, Controls.Shape, Controls.Shell, Controls.Slider, Controls.SwipeView, Controls.Switch, Controls.TabbedPage, Controls.TemplatedView, Controls.TextInput, Controls.Toolbar, Controls.View, Controls.VisualElement, Controls.VisualElementTree, Controls.WebView, Controls.Window, Controls.WindowOverlay, Controls.Xaml, Core.ActivityIndicator, Core.Animation, Core.Application, Core.Border, Core.BoxView, Core.Button, Core.CheckBox, Core.ContentView, Core.DatePicker, Core.Dispatcher, Core.Editor, Core.Element, Core.Entry, Core.FlowDirection, Core.FlyoutView, Core.Fonts, Core.Formatting, Core.Graphics, Core.GraphicsView, Core.Image, Core.ImageButton, Core.ImageSource, Core.IndicatorView, Core.Label, Core.Layout, Core.Lifecycle, Core.MauiContext, Core.Memory, Core.NavigationPage, Core.Page, Core.Picker, Core.ProgressBar, Core.RadioButton, Core.RefreshView, Core.ScrollView, Core.SearchBar, Core.ShapeView, Core.Slider, Core.Stepper, Core.SwipeView, Core.Switch, Core.TimePicker, Core.View, Core.WebView, Core.Window, Core.WindowOverlay |
Controls.Accessibility, Controls.Animations, Controls.Application, Controls.Behavior, Controls.Border, Controls.BoxView, Controls.Button, Controls.CarouselView, Controls.CheckBox, Controls.CollectionView, Controls.Compatibility, Controls.ContentView, Controls.DatePicker, Controls.Dispatcher, Controls.Editor, Controls.Element, Controls.Entry, Controls.FlexLayout, Controls.FlyoutPage, Controls.Frame, Controls.Gesture, Controls.HybridWebView, Controls.Image, Controls.Label, Controls.Layout, Controls.Lifecycle, Controls.Map, Controls.Mapper, Controls.Memory, Controls.MenuFlyout, Controls.Modal, Controls.NavigationPage, Controls.Page, Controls.PageTransitions, Controls.Path, Controls.Picker, Controls.RadioButton, Controls.RefreshView, Controls.ScrollView, Controls.SearchBar, Controls.Shape, Controls.Shell, Controls.Slider, Controls.SwipeView, Controls.Switch, Controls.TabbedPage, Controls.TemplatedView, Controls.TextInput, Controls.Toolbar, Controls.View, Controls.VisualElement, Controls.VisualElementTree, Controls.WebView, Controls.Window, Controls.WindowOverlay, Controls.Xaml, Core.ActivityIndicator, Core.Animation, Core.Application, Core.Border, Core.BoxView, Core.Button, Core.CheckBox, Core.ContentView, Core.DatePicker, Core.Dispatcher, Core.Editor, Core.Element, Core.Entry, Core.FlowDirection, Core.FlyoutView, Core.Fonts, Core.Formatting, Core.Graphics, Core.GraphicsView, Core.Image, Core.ImageButton, Core.ImageSource, Core.IndicatorView, Core.Label, Core.Layout, Core.Lifecycle, Core.MauiContext, Core.Memory, Core.NavigationPage, Core.Page, Core.Picker, Core.ProgressBar, Core.RadioButton, Core.RefreshView, Core.ScrollView, Core.SearchBar, Core.ShapeView, Core.Slider, Core.Stepper, Core.SwipeView, Core.Switch, Core.TimePicker, Core.View, Core.WebView, Core.Window, Core.WindowOverlay |
| iOS | Controls.Accessibility, Controls.Animations, Controls.Application, Controls.Behavior, Controls.Border, Controls.BoxView, Controls.Button, Controls.CarouselView, Controls.CheckBox, Controls.CollectionView, Controls.Compatibility, Controls.ContentView, Controls.DatePicker, Controls.Dispatcher, Controls.Editor, Controls.Element, Controls.Entry, Controls.FlexLayout, Controls.FlyoutPage, Controls.Frame, Controls.Gesture, Controls.HybridWebView, Controls.Image, Controls.Label, Controls.Layout, Controls.Lifecycle, Controls.Map, Controls.Mapper, Controls.Memory, Controls.MenuFlyout, Controls.Modal, Controls.NavigationPage, Controls.Page, Controls.PageTransitions, Controls.Path, Controls.Picker, Controls.RadioButton, Controls.RefreshView, Controls.ScrollView, Controls.SearchBar, Controls.Shape, Controls.Shell, Controls.Slider, Controls.SwipeView, Controls.Switch, Controls.TabbedPage, Controls.TemplatedView, Controls.TextInput, Controls.Toolbar, Controls.View, Controls.VisualElement, Controls.VisualElementTree, Controls.WebView, Controls.Window, Controls.WindowOverlay, Controls.Xaml, Core.ActivityIndicator, Core.Animation, Core.Application, Core.Border, Core.BoxView, Core.Button, Core.CheckBox, Core.ContentView, Core.DatePicker, Core.Dispatcher, Core.Editor, Core.Element, Core.Entry, Core.FlowDirection, Core.FlyoutView, Core.Fonts, Core.Formatting, Core.Graphics, Core.GraphicsView, Core.Image, Core.ImageButton, Core.ImageSource, Core.IndicatorView, Core.Label, Core.Layout, Core.Lifecycle, Core.MauiContext, Core.Memory, Core.NavigationPage, Core.Page, Core.Picker, Core.ProgressBar, Core.RadioButton, Core.RefreshView, Core.ScrollView, Core.SearchBar, Core.ShapeView, Core.Slider, Core.Stepper, Core.SwipeView, Core.Switch, Core.TimePicker, Core.View, Core.WebView, Core.Window, Core.WindowOverlay |
Controls.Accessibility, Controls.Animations, Controls.Application, Controls.Behavior, Controls.Border, Controls.BoxView, Controls.Button, Controls.CarouselView, Controls.CheckBox, Controls.CollectionView, Controls.Compatibility, Controls.ContentView, Controls.DatePicker, Controls.Dispatcher, Controls.Editor, Controls.Element, Controls.Entry, Controls.FlexLayout, Controls.FlyoutPage, Controls.Frame, Controls.Gesture, Controls.HybridWebView, Controls.Image, Controls.Label, Controls.Layout, Controls.Lifecycle, Controls.Map, Controls.Mapper, Controls.Memory, Controls.MenuFlyout, Controls.Modal, Controls.NavigationPage, Controls.Page, Controls.PageTransitions, Controls.Path, Controls.Picker, Controls.RadioButton, Controls.RefreshView, Controls.ScrollView, Controls.SearchBar, Controls.Shape, Controls.Shell, Controls.Slider, Controls.SwipeView, Controls.Switch, Controls.TabbedPage, Controls.TemplatedView, Controls.TextInput, Controls.Toolbar, Controls.View, Controls.VisualElement, Controls.VisualElementTree, Controls.WebView, Controls.Window, Controls.WindowOverlay, Controls.Xaml, Core.ActivityIndicator, Core.Animation, Core.Application, Core.Border, Core.BoxView, Core.Button, Core.CheckBox, Core.ContentView, Core.DatePicker, Core.Dispatcher, Core.Editor, Core.Element, Core.Entry, Core.FlowDirection, Core.FlyoutView, Core.Fonts, Core.Formatting, Core.Graphics, Core.GraphicsView, Core.Image, Core.ImageButton, Core.ImageSource, Core.IndicatorView, Core.Label, Core.Layout, Core.Lifecycle, Core.MauiContext, Core.Memory, Core.NavigationPage, Core.Page, Core.Picker, Core.ProgressBar, Core.RadioButton, Core.RefreshView, Core.ScrollView, Core.SearchBar, Core.ShapeView, Core.Slider, Core.Stepper, Core.SwipeView, Core.Switch, Core.TimePicker, Core.View, Core.WebView, Core.Window, Core.WindowOverlay |
| MacCatalyst | Controls.Accessibility, Controls.Animations, Controls.Application, Controls.Behavior, Controls.Border, Controls.BoxView, Controls.Button, Controls.CarouselView, Controls.CheckBox, Controls.CollectionView, Controls.Compatibility, Controls.ContentView, Controls.DatePicker, Controls.Dispatcher, Controls.Editor, Controls.Element, Controls.Entry, Controls.FlexLayout, Controls.FlyoutPage, Controls.Frame, Controls.Gesture, Controls.HybridWebView, Controls.Image, Controls.Label, Controls.Layout, Controls.Lifecycle, Controls.Map, Controls.Mapper, Controls.Memory, Controls.MenuFlyout, Controls.Modal, Controls.NavigationPage, Controls.Page, Controls.PageTransitions, Controls.Path, Controls.Picker, Controls.RadioButton, Controls.RefreshView, Controls.ScrollView, Controls.SearchBar, Controls.Shape, Controls.Shell, Controls.Slider, Controls.SwipeView, Controls.Switch, Controls.TabbedPage, Controls.TemplatedView, Controls.TextInput, Controls.Toolbar, Controls.View, Controls.VisualElement, Controls.VisualElementTree, Controls.WebView, Controls.Window, Controls.WindowOverlay, Controls.Xaml, Core.ActivityIndicator, Core.Animation, Core.Application, Core.Border, Core.BoxView, Core.Button, Core.CheckBox, Core.ContentView, Core.DatePicker, Core.Dispatcher, Core.Editor, Core.Element, Core.Entry, Core.FlowDirection, Core.FlyoutView, Core.Fonts, Core.Formatting, Core.Graphics, Core.GraphicsView, Core.Image, Core.ImageButton, Core.ImageSource, Core.IndicatorView, Core.Label, Core.Layout, Core.Lifecycle, Core.MauiContext, Core.Memory, Core.NavigationPage, Core.Page, Core.Picker, Core.ProgressBar, Core.RadioButton, Core.RefreshView, Core.ScrollView, Core.SearchBar, Core.ShapeView, Core.Slider, Core.Stepper, Core.SwipeView, Core.Switch, Core.TimePicker, Core.View, Core.WebView, Core.Window, Core.WindowOverlay |
Controls.Accessibility, Controls.Animations, Controls.Application, Controls.Behavior, Controls.Border, Controls.BoxView, Controls.Button, Controls.CarouselView, Controls.CheckBox, Controls.CollectionView, Controls.Compatibility, Controls.ContentView, Controls.DatePicker, Controls.Dispatcher, Controls.Editor, Controls.Element, Controls.Entry, Controls.FlexLayout, Controls.FlyoutPage, Controls.Frame, Controls.Gesture, Controls.HybridWebView, Controls.Image, Controls.Label, Controls.Layout, Controls.Lifecycle, Controls.Map, Controls.Mapper, Controls.Memory, Controls.MenuFlyout, Controls.Modal, Controls.NavigationPage, Controls.Page, Controls.PageTransitions, Controls.Path, Controls.Picker, Controls.RadioButton, Controls.RefreshView, Controls.ScrollView, Controls.SearchBar, Controls.Shape, Controls.Shell, Controls.Slider, Controls.SwipeView, Controls.Switch, Controls.TabbedPage, Controls.TemplatedView, Controls.TextInput, Controls.Toolbar, Controls.View, Controls.VisualElement, Controls.VisualElementTree, Controls.WebView, Controls.Window, Controls.WindowOverlay, Controls.Xaml, Core.ActivityIndicator, Core.Animation, Core.Application, Core.Border, Core.BoxView, Core.Button, Core.CheckBox, Core.ContentView, Core.DatePicker, Core.Dispatcher, Core.Editor, Core.Element, Core.Entry, Core.FlowDirection, Core.FlyoutView, Core.Fonts, Core.Formatting, Core.Graphics, Core.GraphicsView, Core.Image, Core.ImageButton, Core.ImageSource, Core.IndicatorView, Core.Label, Core.Layout, Core.Lifecycle, Core.MauiContext, Core.Memory, Core.NavigationPage, Core.Page, Core.Picker, Core.ProgressBar, Core.RadioButton, Core.RefreshView, Core.ScrollView, Core.SearchBar, Core.ShapeView, Core.Slider, Core.Stepper, Core.SwipeView, Core.Switch, Core.TimePicker, Core.View, Core.WebView, Core.Window, Core.WindowOverlay |
| Windows | Controls.Accessibility, Controls.Animations, Controls.Application, Controls.Behavior, Controls.Border, Controls.BoxView, Controls.Button, Controls.CarouselView, Controls.CheckBox, Controls.CollectionView, Controls.Compatibility, Controls.ContentView, Controls.DatePicker, Controls.Dispatcher, Controls.Editor, Controls.Element, Controls.Entry, Controls.FlexLayout, Controls.FlyoutPage, Controls.Frame, Controls.Gesture, Controls.HybridWebView, Controls.Image, Controls.Label, Controls.Layout, Controls.Lifecycle, Controls.Map, Controls.Mapper, Controls.Memory, Controls.MenuFlyout, Controls.Modal, Controls.NavigationPage, Controls.Page, Controls.PageTransitions, Controls.Path, Controls.Picker, Controls.RadioButton, Controls.RefreshView, Controls.ScrollView, Controls.SearchBar, Controls.Shape, Controls.Shell, Controls.Slider, Controls.SwipeView, Controls.Switch, Controls.TabbedPage, Controls.TemplatedView, Controls.TextInput, Controls.Toolbar, Controls.View, Controls.VisualElement, Controls.VisualElementTree, Controls.WebView, Controls.Window, Controls.WindowOverlay, Controls.Xaml, Core.ActivityIndicator, Core.Animation, Core.Application, Core.Border, Core.BoxView, Core.Button, Core.CheckBox, Core.ContentView, Core.DatePicker, Core.Dispatcher, Core.Editor, Core.Element, Core.Entry, Core.FlowDirection, Core.FlyoutView, Core.Fonts, Core.Formatting, Core.Graphics, Core.GraphicsView, Core.Image, Core.ImageButton, Core.ImageSource, Core.IndicatorView, Core.Label, Core.Layout, Core.Lifecycle, Core.MauiContext, Core.Memory, Core.NavigationPage, Core.Page, Core.Picker, Core.ProgressBar, Core.RadioButton, Core.RefreshView, Core.ScrollView, Core.SearchBar, Core.ShapeView, Core.Slider, Core.Stepper, Core.SwipeView, Core.Switch, Core.TimePicker, Core.View, Core.WebView, Core.Window, Core.WindowOverlay |
Controls.Accessibility, Controls.Animations, Controls.Application, Controls.Behavior, Controls.Border, Controls.BoxView, Controls.Button, Controls.CarouselView, Controls.CheckBox, Controls.CollectionView, Controls.Compatibility, Controls.ContentView, Controls.DatePicker, Controls.Dispatcher, Controls.Editor, Controls.Element, Controls.Entry, Controls.FlexLayout, Controls.FlyoutPage, Controls.Frame, Controls.Gesture, Controls.HybridWebView, Controls.Image, Controls.Label, Controls.Layout, Controls.Lifecycle, Controls.Map, Controls.Mapper, Controls.Memory, Controls.MenuFlyout, Controls.Modal, Controls.NavigationPage, Controls.Page, Controls.PageTransitions, Controls.Path, Controls.Picker, Controls.RadioButton, Controls.RefreshView, Controls.ScrollView, Controls.SearchBar, Controls.Shape, Controls.Shell, Controls.Slider, Controls.SwipeView, Controls.Switch, Controls.TabbedPage, Controls.TemplatedView, Controls.TextInput, Controls.Toolbar, Controls.View, Controls.VisualElement, Controls.VisualElementTree, Controls.WebView, Controls.Window, Controls.WindowOverlay, Controls.Xaml, Core.ActivityIndicator, Core.Animation, Core.Application, Core.Border, Core.BoxView, Core.Button, Core.CheckBox, Core.ContentView, Core.DatePicker, Core.Dispatcher, Core.Editor, Core.Element, Core.Entry, Core.FlowDirection, Core.FlyoutView, Core.Fonts, Core.Formatting, Core.Graphics, Core.GraphicsView, Core.Image, Core.ImageButton, Core.ImageSource, Core.IndicatorView, Core.Label, Core.Layout, Core.Lifecycle, Core.MauiContext, Core.Memory, Core.NavigationPage, Core.Page, Core.Picker, Core.ProgressBar, Core.RadioButton, Core.RefreshView, Core.ScrollView, Core.SearchBar, Core.ShapeView, Core.Slider, Core.Stepper, Core.SwipeView, Core.Switch, Core.TimePicker, Core.View, Core.WebView, Core.Window, Core.WindowOverlay |
GPT-6.2 Sol — Run all Controls and Core device tests on Android, iOS, Mac Catalyst, and Windows to cover shared storage, binding, layout, and handler updates.
- BindableObject, View, VisualElement and Layout changes span Controls.
- Element and InputView notification changes warrant Core handler coverage.
- No Graphics, Essentials or BlazorWebView project changes; the Windows TextBox edit is comment-only.
MAI Code 2 — Typed bindable storage affects foundational Controls behavior and Core platform integration, requiring all Controls and Core device tests on every platform.
- BindableObject, BindableProperty, View, VisualElement, Element, and layout internals form a cross-platform base-class change, so all Controls device categories are relevant.
- Typed storage changes the value and notification pipeline used by Core handlers and the Windows TextBox integration, warranting all Core handler categories.
- No Graphics, Essentials, or BlazorWebView production projects are changed, so those independent suites are deliberately omitted.
- Unit-test, XAML-test, benchmark, and Public API-only changes do not narrow the runtime blast radius or add UI-only test-only work.
Generated by /review run-tests. A targeted run is a fast signal, not full-suite certification.
MAUI Autopilot — Ready for maintainer reviewResults
|




Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
3f40772f2cde39dffc1114967713d8aec2ea275a↑ NativeAOT macOS probe published and propagated a typed binding; no IL2091 was reported.
↑ All 18 Pester failures on this head also failed by name in a fresh run on merged
main.↓ Build Insights remains pending; no exact-head platform, device or UI builds were found in the public listings. Mobile trim/AOT is unverified.
↓ Full Controls.Core suite has 31 locally baseline-correlated GC failures; performance was not rerun after the fixes.
↓ Public generic DAM requirements can warn generic callers; adopted-property
GetType()changes toBindableProperty<T>.Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Target Branch
mainnet11, for reviewFor .NET 11 fixes, only a maintainer retargets the approved PR to the active
inflight lane and merges it after CI validates that final base. Do not merge
individual fixes directly into
net11; agents must not retarget or merge.Description of Change
Important
This is a first exploratory attempt, not a merge-ready proposal. It exists to evaluate whether typed, unboxed bindable-property storage is feasible for .NET 12 without breaking existing apps. Binary and source backwards compatibility with .NET 11 (especially already-compiled XAML from XamlC and SourceGen) is the top constraint; every design choice below is subordinate to it. API shape, naming and scope are all open for discussion.
Motivation
Every
BindableObject.SetValue(BindableProperty, object)for a value-type property (double,bool,Thickness,GridLength, enums…) boxes, and the setter runs conversion/validation logic designed for arbitraryobjectinput. Layout-heavy properties (X/Y/Width/Height,Margin,Padding, grid rows/columns) are written constantly, so this cost shows up in layout passes.New public API (minimal, additive)
BindablePropertychanges fromsealedto unsealed, with aprivate protectedconstructor so only the framework can derive. Unsealing is binary compatible.Key design decisions
BindablePropertytype. Field type is part of the IL field signature that already-compiled XamlC/SourceGen code and libraries reference vialdsfld. Adopted properties therefore use the pattern:SetValue(AnchorXProperty, object)keeps working through the legacy pipeline.CreateContext()onBindableProperty;BindableProperty<T>returns aBindablePropertyContext<T>holdingTunboxed, with a lazily cached object box for legacy observers (GetValue(object),PropertyChangedconsumers, bindings). Box identity,BooleanBoxes, coercion box preservation and delayed re-entrant setter semantics are preserved.BindableProperty<T>.Createis strict. TypedSetValue<T>short-circuits converters entirely; object writes to a strict property must already be instances ofT(noTypeConverter/implicit conversions). This is stricter than today, intentionally, and only applies to new properties authors opt into — no existing property changes behavior.CreateCompatible(andCreateReadOnlyCompatible+ an internal typed key setter) so built-in properties keep today's conversion behavior for object writes, including XAML string values and legacy read-only binding modes (OneWayToSourceforX/Y/Width/Height).NoInliningslow path that reuses the existing object pipeline rather than duplicating it.EqualityComparer<T>.Defaultboxes structs that don't implementIEquatable<T>(Thickness,GridLength), which initially erased the gains. Narrowtypeof(T)guarded specializations use the existing==operators (reproducing legacy object equality, includingGridLengthinfinity quirks). No public struct/API changes. Arbitrary user structs withoutIEquatable<T>may still box.Tcarries[DynamicallyAccessedMembers]onBindableProperty<T>and the genericGetValue<T>/SetValue<T>, becausetypeof(T)flows into the existing annotatedReturnType/constructor contract.Element'sprivate protected OnBindablePropertySetoverride becameOnBindablePropertySetCompleted(with aIsRaisingPropertySetNotificationcheck replacing a per-elementHashSet).private protected, no overrides outside Controls.Core.Adopted properties (38 typed declarations)
VisualElement:X,Y,Width,Height(read-only),AnchorX/Y,TranslationX/Y,Opacity,IsVisible,Rotation*,Scale*, size requests and other common doubles;View:Margin,HorizontalOptions,VerticalOptions;Padding(Layout/Page/Border/Button/Label);StackBase.Spacing;Grid:RowSpacing,ColumnSpacing, attachedRow/Column/RowSpan/ColumnSpan;RowDefinition.Height,ColumnDefinition.Width;FontSize,FontAttributes,FontAutoScalingEnabled.Compatibility evidence
BindableProperty<T>fromGetType().Performance — final comparisons
Existing MAUI is the unmodified implementation used as the baseline for each experiment; the baseline revision differs between experiments. This PR is the typed-property implementation proposed here, without the separate binding rewrite. The combined experiment at the end is explicitly separate from this PR.
These are exploratory measurements, not rerun for this edit. Ratios compare the candidate with the baseline for the same scenario (
1.000= baseline); lower time is better. Every chart's vertical axis starts at zero.Compiled bindings in this PR
The benchmark compares existing MAUI at
4ea2adc55dwith this PR atd85d5a3be2, on .NET 12 ARM64 macOS. It uses bindings generated byBindingBase.Createand an inline dispatcher, without native rendering. Each row contains 100 operations; the reported time is the median of three interleaved BenchmarkDotNet run means, not the fastest run or the median of individual measurements. Allocation is per 100 operations.The string case targets the existing untyped
Label.TextProperty. A different compiled-binding workload previously regressed and has not been rerun at the PR head; these scenarios do not establish that the regression is fixed.Real Controls layout in this PR
The existing-MAUI column uses the legacy Controls baseline build; the PR column uses the adopted-property build. Results are medians of three per-run medians, in µs per invocation, with 100 real Controls children and deterministic leaf measurement. These are managed layout measurements, not native rendering.
Sample app startup in this PR
Existing MAUI here is the
mainsource snapshot1344d16421at the time of measurement; the PR source isd85d5a3be2. The snapshots contain other source differences, so this comparison does not isolate the typed-property change. Both used the same CoreCLR publish setup per platform, with 30 retained launches per source and three warmups.1 Android first draw and the iOS display-opportunity proxy have different measurement boundaries; do not compare absolute Android and iOS times. Ratios compare the marginal medians; the separately paired 95% confidence intervals both include zero.No typed-property-specific first-draw improvement was established in these runs.
Separate experiment: typed properties plus faster bindings
Combined prototype means this PR plus an earlier snapshot (
1c3e64a937) of the binding-subscription work in #40819, plus a cached direct typed-target path. It is a local experiment, not part of this PR, and it was not measured against the current head of #40819. The baseline and methodology are the same as the binding table above.The experiment resolves whether a matching typed target can bypass conversion when the binding is applied, then propagates eligible values without boxing. It uses the existing binding class; a separate class was not benchmarked. Its experimental fast path can retry a throwing getter and lose the first diagnostic, so it is not ready to adopt.
Review blocker fixes (this update)
The
ApplyBindingssnapshot work was reverted from this PR with a normal revert commit; it is being proposed separately. The branch has also merged currentmain. The following review blockers are fixed, each with a test that fails without its fix:ApplyTypedinvokes the getter once and applies the default through the normal target path on failureCompiledBindingRunsAFailingGetterOnce(throwing and non-throwing)Binding.DoNothingwas ignored by the typed fast pathsApplyTyped; guard in typedUpdateSourceCompiledBindingGetterReturningDoNothingLeavesTypedTargetUnchanged,CompiledTwoWayBindingDoesNotWriteDoNothingToTheSourceReferenceEqualsfor references, bitwise for unmanaged structs, and always reboxes structs that contain referencesObjectWriteKeepsAnEqualButDistinctCoercedInstance,ObjectWriteKeepsACoercedPositiveZerotry/finallyaround the notification markerManualPropertyChangedUpdatesHandlerAfterAThrowingObjectNotificationStylesetters could not resolve typedBindableProperty<T>fieldsBindablePropertyConverteraccepts anyBindableProperty-assignable field; SourceGen walks base typesStyleSetterResolvesTypedBindablePropertyField(Runtime and SourceGen)Tflowing into annotated members[DynamicallyAccessedMembers]propagated to the public genericGetValue<T>/SetValue<T>, the internal typed set chain andOnBindablePropertySet<T>; suppressions for the remainingTypedBindingpathsWithout the SourceGen fix, the XAML test fails to build with
MAUIX2002. Without the converter fix, the Runtime case fails with "Can't resolve ScoreProperty".Note
The DAM annotation on the public generic
GetValue<T>/SetValue<T>is a trimming contract: a generic caller passing its own unannotatedTnow gets IL2091. This is discussed as an open API-shape question.Validation (this update, local macOS ARM64, net12.0 only)
dotnet test src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj --filter-class "*TypedBindableProperty*"dotnet test src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj -p:IncludeIosTargetFrameworks=false -p:IncludeAndroidTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false --no-build --filter-class '*TypedBindablePropertyEquivalenceTests*'dotnet test src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csprojorigin/mainin this environment.dotnet test src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csprojdotnet test src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csprojdotnet build src/Controls/src/Core(PublicAPI analyzers)dotnet publish TrimProbe.csproj -r osx-arm64 -p:PublishAot=true -p:MauiOutput=<Controls.Core build output> --no-restoreand run the resultingTrimProbeCI snapshot, 2026-11-30 17:14 UTC, at
3f40772f2cde39dffc1114967713d8aec2ea275a: Pester scripts failed 18 of 2,494 tests. A fresh workflow_dispatch on mergedmainbd40bc6d0fc12d259634aaf4c01ad0086b331e42produced the identical 18 failure names and totals, so the failures are baseline-correlated rather than evidence of a PR-specific regression.Build Insights remains in progress since 16:07 UTC without a result. Public Azure DevOps listings for
maui-pr,maui-pr-devicetestsandmaui-pr-uitests, including deleted runs and the PR merge and source refs, returned no run for this head. The only PR-merge build returned was maui-pr 1704173, which failed on the olderd85d5a3be2head and cannot validate this revision.gh pr checks 40798 --repo dotnet/maui --requiredshowed onlylicense/clapassing; that does not establish a successful build.Remaining before reconsidering draft: obtain and inspect exact-head platform, device and UI results and Build Insights; validate mobile trimming/NativeAOT behavior; rerun relevant binding and layout performance comparisons against a matched
mainbaseline. Performance numbers above were not rerun after these fixes.Issues Fixed
None — exploratory prototype.
Let AI finish this PR
Footnotes
Startup used .NET 11 RC source-retargeted builds, not .NET 12 mobile builds. Each source/platform run used a freshly collected matching startup MIBC. iOS used an unsupported SDK/Xcode pairing. ↩