Visual Studio重构重命名会导致XAML文件中无法解释的全局属性替换

dev*_*xer 6 c# wpf refactoring xaml visual-studio

我觉得我必须疯狂,但我只是在视图模型(C#文件)WidthSize使用Visual Studio的重构重命名功能更改了属性的名称.完成后,错误窗口中出现此错误:

错误2:XML命名空间"http://schemas.microsoft.com/winfx/2006/xaml/presentation"中不存在属性"大小".

该错误指的是XAML UserControl文件.当我检查文件以查看是什么时,我意识到名称的每个属性Width都已更改为Size.

例:

<UserControl x:Class="ApbSymbolGenerator.Views.Symbol"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             Size="{Binding Size}"
             Height="{Binding Size}">
Run Code Online (Sandbox Code Playgroud)

这是我第一次使用重构重命名导致更改XAML文件(除了x:class值).(注:我并没有做一个全球查找/替换,我做了重构,重命名我毁掉了一切,并再次进行重命名,它也做了同样的事情.)

奇怪的是,它只影响我的应用程序中具有Width属性的几个XAML文件中的一个.

有什么解释可以在这里发生什么?

Phi*_*ler 5

看起来这是一个错误(不会被修复) - 重构重命名Bug