Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename feature in XAML within VS2022 #77894

Open
Haale opened this issue Mar 28, 2025 · 1 comment
Open

Rename feature in XAML within VS2022 #77894

Haale opened this issue Mar 28, 2025 · 1 comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@Haale
Copy link

Haale commented Mar 28, 2025

1.I cannot rename a button named by x:Name in XAML. Even if I change the x:Name of the button, the reference in the code - behind doesn't change synchronously.

2.When binding to an object data source, if I rename some property names, the references to those properties in XAML don't change synchronously.

How can I fix this in VS2022?

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 28, 2025
@mgoertz-msft
Copy link
Contributor

Refactor rename support is extremely limited in XAML. You would need to use Rename in Files. IIRC, the only thing that works is renaming the code-behind class name and it should rename the x:Class in XAML.

Here's an old feedback ticket that tracks the rename issue: https://developercommunity.visualstudio.com/t/xaml-refactoring-especially-for-rename-of-properti/351173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants