misc: revert DynamicResource Copy Button.

This commit is contained in:
Zhang Dian
2025-01-21 23:50:22 +08:00
parent b5fe4d92a6
commit 58c1c365a9
7 changed files with 34 additions and 108 deletions

View File

@@ -135,16 +135,11 @@ public partial class ColorItemViewModel : ObservableObject
[ObservableProperty] private string? _colorResourceKey;
[ObservableProperty] private string? _hex;
public string CopyText1 =>
public string CopyText =>
$"""
<StaticResource x:Key="" ResourceKey="{ResourceKey}" />
""";
public string CopyText2 =>
$"""
<DynamicResource x:Key="" ResourceKey="{ResourceKey}" />
""";
public ColorItemViewModel(string colorDisplayName, ISolidColorBrush brush, string resourceKey, bool light,
int index)
{
@@ -201,16 +196,11 @@ public partial class ShadowItemViewModel : ObservableObject
[ObservableProperty] private string? _resourceKey;
[ObservableProperty] private string? _boxShadowValue;
public string CopyText1 =>
public string CopyText =>
$"""
<StaticResource x:Key="" ResourceKey="{ResourceKey}" />
""";
public string CopyText2 =>
$"""
<DynamicResource x:Key="" ResourceKey="{ResourceKey}" />
""";
public ShadowItemViewModel(string shadowDisplayName, BoxShadows boxShadows, string resourceKey)
{
ShadowDisplayName = shadowDisplayName;