是否有一个很好的工具可以从 XAML 中查找对属性的引用?
Is there a good tool for finding references to properties from within the XAML?
Studio 只擅长查找代码之间的引用。有没有一种好方法可以准确查看属性映射到 XAML 的位置?
如果您使用类型绑定,例如
<Window xmlns:MyNamespace="clr-namespace:MyNamespace"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
...>
...
<StackPanel d:DataContext="{d:DesignInstance Type=MyNamespace:MyType}">
... <!-- The binding types inside this StackPanel are typed -->
</StackPanel>
...然后您可以使用 "Find References" 查找 属性 用法、进行重构等...
我认为如果使用 ReSharper,设计时体验会更好...
此处描述:https://blog.rsuter.com/recommendations-best-practices-implementing-mvvm-xaml-net-applications/
Studio 只擅长查找代码之间的引用。有没有一种好方法可以准确查看属性映射到 XAML 的位置?
如果您使用类型绑定,例如
<Window xmlns:MyNamespace="clr-namespace:MyNamespace"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
...>
...
<StackPanel d:DataContext="{d:DesignInstance Type=MyNamespace:MyType}">
... <!-- The binding types inside this StackPanel are typed -->
</StackPanel>
...然后您可以使用 "Find References" 查找 属性 用法、进行重构等...
我认为如果使用 ReSharper,设计时体验会更好...
此处描述:https://blog.rsuter.com/recommendations-best-practices-implementing-mvvm-xaml-net-applications/