make lurking wife mode work with editable text block and two way binding.
MODIFY
WalletWasabi.Gui/Controls/EditableTextBlock.cs
WalletWasabi.Gui/Controls/EditableTextBlock.cs
@@ -99,7 +99,7 @@ namespace WalletWasabi.Gui.Controls
public static readonly DirectProperty<EditableTextBlock, string> TextProperty = TextBlock.TextProperty.AddOwner<EditableTextBlock>(
o => o.Text,
(o, v) => o.Text = v,
- defaultBindingMode: BindingMode.OneWay,
+ defaultBindingMode: BindingMode.TwoWay,
enableDataValidation: true);
[Content]

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabView.xaml
</Grid>
</Grid>
- <controls:EditableTextBlock Text="{Binding Label, ConverterParameter=27, Converter={StaticResource LurkingWifeModeStringConverter}, Mode=OneWay}"
+ <controls:EditableTextBlock Text="{Binding Label, ConverterParameter=27, Converter={StaticResource LurkingWifeModeStringConverter}}"
InEditMode="{Binding InEditMode}"
ReadOnlyMode="{Binding IsLurkingWifeMode}" Grid.Column="1" />
</Grid>

MODIFY
WalletWasabi.Gui/Converters/LurkingWifeModeStringConverter.cs
WalletWasabi.Gui/Converters/LurkingWifeModeStringConverter.cs
@@ -28,7 +28,7 @@ namespace WalletWasabi.Gui.Converters
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
- throw new NotSupportedException();
+ return value.ToString();
}
}
}

MODIFY
WalletWasabi.Gui/ViewModels/AddressViewModel.cs
WalletWasabi.Gui/ViewModels/AddressViewModel.cs
@@ -105,7 +105,13 @@ namespace WalletWasabi.Gui.ViewModels
public string Label
{
get => _label;
- set => this.RaiseAndSetIfChanged(ref _label, value);
+ set
+ {
+ if (!IsLurkingWifeMode)
+ {
+ this.RaiseAndSetIfChanged(ref _label, value);
+ }
+ }
}
public bool InEditMode

make lurking wife mode work with editable text block and two way binding.