Closed
Description
- .NET Core Version: 3.0.100-preview-010184
- Windows version: 1809 (17763.253)
- Does the bug reproduce also in WPF for .NET Framework 4.8?: No
Problem description:
Build error occurs if ControlTemplate contains a visual element and VisualState with the same names
Actual behavior:
Build error "MC4101: The Name 'Normal' has already been defined. Names must be unique." occurs
Expected behavior:
No build errors
Minimal repro:
Create new .Net Core 3 wpf project, add the following ControlTemplate
<Window.Resources>
<ControlTemplate TargetType="Button" x:Key="buttonStyle">
<Border x:Name="Normal">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="TestGroup">
<VisualState x:Name="Normal" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Border>
</ControlTemplate>
</Window.Resources>
and try to build the project.