Find Unresolved XAML Bindings
find_unresolved_bindingsDetect silently broken XAML bindings whose root member is missing from a confidently resolved DataContext view-model, catching typos or renamed/removed members that compilers and smoke tests miss.
Instructions
List silently broken XAML bindings: a {Binding X} whose root member does NOT exist on its confidently resolved DataContext view-model (typo, removed/renamed member, or wrong DataContext) - the defect class that NEITHER the compiler NOR render-smoke tests catch.
Use it after renaming or removing view-model members. It judges the ROOT member of a binding path only. To see where a member or a resource key is bound use find_binding_usages / find_resource_usages.
Covers WPF/WinUI .xaml (view-model via d:DesignInstance or a unique FooView->FooViewModel convention) and Avalonia .axaml ({Binding}/{CompiledBinding}, only via x:DataType). Conservative BY SKIPPING, and the skip is what carries the accuracy claim: a binding whose DataContext scope cannot be typed with certainty (ControlTemplate/Style, runtime DataContext, keyed resources, a DataType-less template unless - WPF only - its host's ItemsSource types it), or whose view-model has an unverifiable external base, is never flagged - a recall miss, never a false report. Source-generated ([ObservableProperty]/[RelayCommand]) and inherited members count as resolved. One false-report class was measured: a HierarchicalDataTemplate's own ItemsSource mis-pinned onto its content read 8/8 false on MahApps.Metro and is fixed + fixture-pinned (0 after). So read a hit as high-confidence evidence to verify at its file and line, not as proof.
Returns JSON: count and unresolvedBindings (view, viewModel, member, line; one entry per site), plus markupFilesScanned and bindingSitesInMarkup from a live disk walk, which tell a clean zero from 'no markup at all'. The denominator of count: sitesJudged (root member checked on a resolved type) and sitesSkipped, by reason in sitesSkippedBy; judgementNote names any gap to bindingSitesInMarkup. Both null on a recalled session.
Read-only. The findings come from the LIVE analysis: call refresh_session after edits. A recalled DB snapshot reports none, and a 'note' says so when the session looks recalled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use. |