Find Unresolved XAML Bindings
find_unresolved_bindingsDetect silently broken XAML bindings whose root member is missing from a confidently resolved DataContext view-model; use after renaming or removing view-model members.
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) - neither the compiler nor a render smoke catches it.
Use it after renaming or removing view-model members. It judges a binding path's ROOT member only. Where a member or a resource key is bound: 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: a binding whose DataContext scope cannot be typed with certainty (ControlTemplate, any Style but the element's own inline one, runtime DataContext, keyed resources, a DataType-less template unless - WPF only - its host's ItemsSource types it, code-behind setting DataContext = this), or whose view-model has an unverifiable external base, is never flagged. Source-generated ([ObservableProperty]/[RelayCommand]) and inherited members count as resolved. A hit is evidence to verify at its line, not proof.
Returns count and unresolvedBindings (view, viewModel, member, line; one entry per site), plus markupFilesScanned and bindingSitesInMarkup from a live disk walk. count's denominator: sitesJudged and sitesSkipped, by reason in sitesSkippedBy (both null on a recalled session); judgementNote names any gap to bindingSitesInMarkup. sitesSkippedByView: each view's skipped sites by reason, with lines (max 100 views).
WinUI {x:Bind} is apart: each path segment is looked up on the page's x:Class or the template's x:DataType; one absent on a non-partial type is listed with form 'xBind' (viewModel = the type looked in). xBindSitesInMarkup/Judged/Skipped/SkippedBy: only where x:Bind sites exist.
Read-only; LIVE analysis only: refresh_session after edits (a recalled snapshot reports none; a 'note' says so).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>"
},
"name": "find_unresolved_bindings"
}
}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. |