diff --git a/ILSpy.BamlDecompiler.Tests/BamlTestRunner.cs b/ILSpy.BamlDecompiler.Tests/BamlTestRunner.cs
index f57910e9f..e07884a11 100644
--- a/ILSpy.BamlDecompiler.Tests/BamlTestRunner.cs
+++ b/ILSpy.BamlDecompiler.Tests/BamlTestRunner.cs
@@ -148,6 +148,12 @@ namespace ILSpy.BamlDecompiler.Tests
RunTest("cases/issue2097");
}
+ [Test]
+ public void Issue2116()
+ {
+ RunTest("cases/issue2116");
+ }
+
#region RunTest
void RunTest(string name)
{
diff --git a/ILSpy.BamlDecompiler.Tests/Cases/Issue2116.xaml b/ILSpy.BamlDecompiler.Tests/Cases/Issue2116.xaml
new file mode 100644
index 000000000..7f977065d
--- /dev/null
+++ b/ILSpy.BamlDecompiler.Tests/Cases/Issue2116.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/ILSpy.BamlDecompiler.Tests/Cases/Issue2116.xaml.cs b/ILSpy.BamlDecompiler.Tests/Cases/Issue2116.xaml.cs
new file mode 100644
index 000000000..4a282422f
--- /dev/null
+++ b/ILSpy.BamlDecompiler.Tests/Cases/Issue2116.xaml.cs
@@ -0,0 +1,16 @@
+namespace ILSpy.BamlDecompiler.Tests.Cases
+{
+ using System.Windows;
+ using System.Windows.Controls;
+
+ public partial class Issue2116 : UserControl
+ {
+ public static ComponentResourceKey StyleKey1 => new ComponentResourceKey(typeof(Issue2116), "TestStyle1");
+ public static ComponentResourceKey StyleKey2 => new ComponentResourceKey(typeof(Issue2116), "TestStyle2");
+
+ public Issue2116()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj
index 986e28d29..e74befdd3 100644
--- a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj
+++ b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj
@@ -59,6 +59,7 @@
+
MyControl.xaml
@@ -99,6 +100,9 @@
MSBuild:Compile
+
+ MSBuild:Compile
+
Designer