Skip to content

[Bug]: F12 on an element name in x:Bind opens the generated .g.i.cs file #365

Closed

Description

Describe the bug

Go to Definition on Heading in {x:Bind Heading.Text} opens the generated field in obj\...\MainPage.g.i.cs instead of the x:Name="Heading" declaration. ElementName=Heading correctly goes to the XAML.

To Reproduce

  1. In a page, add <TextBlock x:Name="Heading"/> and <TextBlock Text="{x:Bind Heading.Text}"/>.
  2. F12 on Heading in the x:Bind.

Expected behavior

Navigates to the x:Name attribute in the XAML file.

Notes

Bug bash ID: C-43.

Screenshots

No response

OS Version and details

Windows 11 x64 (10.0.26200), VS Code 1.143.1, .NET SDK 10.0.403. Found in the XAML IntelliSense bug bash on 0.3.1-prerelease.456 (PR #276, f90df977).

Activity

  1. chiaramooney commented on Nov 6, 2026

    @chiaramooney
    CollaboratorAuthor

    This was already fixed on main in 9dcfcca, which routes x:Bind named-element roots through the shared name-reference resolver so F12 goes to the x:Name declaration in XAML instead of the generated .g.i.cs field. Closing as complete. #370 adds live regression tests for the positional, Path=, and function-argument forms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions