I feel like I must be going crazy, but I just changed the name of a property in a view model (a C# file) from Width
to Size
using Visual Studio's refactor-rename feature. When I was done, this error appeared in the Error window:
Error 2: The property 'Size' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'.
The error was referring to a XAML UserControl
file. When I checked the file to see what was up, I realized that every attribute named Width
had been changed to Size
.
Example:
<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}">
This is the first time I've ever had refactor-rename cause a change to a XAML file (besides the x:class
value). (Note: I did not do a global find/replace, I did refactor-rename. I undid everything and performed the rename again, and it did the same thing.)
Strangely, it only affected one of several XAML files in my app that has a Width
property.
Any explanation what could be going on here?
Looks like this is a bug (that won't be fixed) - Refactor Rename Bug
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With