diff --git a/ILSpy/Controls/ResourceObjectTable.xaml b/ILSpy/Controls/ResourceObjectTable.xaml
index e719f15b1d..854a6a28e8 100644
--- a/ILSpy/Controls/ResourceObjectTable.xaml
+++ b/ILSpy/Controls/ResourceObjectTable.xaml
@@ -22,6 +22,16 @@
Value="{Binding RelativeSource={RelativeSource Self},
Path=(ItemsControl.AlternationIndex),
Converter={StaticResource BackgroundConverter}}" />
+
+
+
+
+
+
+
+
+
+
diff --git a/ILSpy/Controls/ResourceObjectTable.xaml.cs b/ILSpy/Controls/ResourceObjectTable.xaml.cs
index 20f2a2a480..9b3ff1ff2a 100644
--- a/ILSpy/Controls/ResourceObjectTable.xaml.cs
+++ b/ILSpy/Controls/ResourceObjectTable.xaml.cs
@@ -81,6 +81,27 @@ void ExecuteCopy(object sender, ExecutedRoutedEventArgs args)
StringBuilder sb = new StringBuilder();
foreach (var item in resourceListView.SelectedItems)
{
+ if (item is TreeNodes.ResourcesFileTreeNode.SerializedObjectRepresentation so)
+ {
+ switch (args.Parameter)
+ {
+ case "Key":
+ sb.AppendLine(so.Key);
+ continue;
+
+ case "Value":
+ sb.AppendLine(so.Value);
+ continue;
+
+ case "Type":
+ sb.AppendLine(so.Type);
+ continue;
+
+ default:
+ sb.AppendLine($"{so.Key}\t{so.Value}\t{so.Type}");
+ continue;
+ }
+ }
sb.AppendLine(item.ToString());
}
Clipboard.SetText(sb.ToString());
diff --git a/ILSpy/Controls/ResourceStringTable.xaml b/ILSpy/Controls/ResourceStringTable.xaml
index b2ce2127cd..b9db04815e 100644
--- a/ILSpy/Controls/ResourceStringTable.xaml
+++ b/ILSpy/Controls/ResourceStringTable.xaml
@@ -22,6 +22,15 @@
Value="{Binding RelativeSource={RelativeSource Self},
Path=(ItemsControl.AlternationIndex),
Converter={StaticResource BackgroundConverter}}" />
+
+
+
+
+
+
+
+
+
diff --git a/ILSpy/Controls/ResourceStringTable.xaml.cs b/ILSpy/Controls/ResourceStringTable.xaml.cs
index d76df22a25..61d47a39cd 100644
--- a/ILSpy/Controls/ResourceStringTable.xaml.cs
+++ b/ILSpy/Controls/ResourceStringTable.xaml.cs
@@ -81,6 +81,23 @@ void ExecuteCopy(object sender, ExecutedRoutedEventArgs args)
StringBuilder sb = new StringBuilder();
foreach (var item in resourceListView.SelectedItems)
{
+ if (item is KeyValuePair pair)
+ {
+ switch (args.Parameter)
+ {
+ case "Key":
+ sb.AppendLine(pair.Key);
+ continue;
+
+ case "Value":
+ sb.AppendLine(pair.Value);
+ continue;
+
+ default:
+ sb.AppendLine($"{pair.Key}\t{pair.Value}");
+ continue;
+ }
+ }
sb.AppendLine(item.ToString());
}
Clipboard.SetText(sb.ToString());