allow continue button if the typed text is valid
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Labels/SuggestionLabelsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Labels/SuggestionLabelsViewModel.cs
@@ -10,13 +10,15 @@ using WalletWasabi.Fluent.Helpers;
namespace WalletWasabi.Fluent.ViewModels.Wallets.Labels
{
- public class SuggestionLabelsViewModel : ViewModelBase
+ public partial class SuggestionLabelsViewModel : ViewModelBase
{
private readonly SourceList<SuggestionLabelViewModel> _sourceLabels;
private readonly ObservableCollectionExtended<string> _topSuggestions;
private readonly ObservableCollectionExtended<string> _suggestions;
private readonly ObservableCollectionExtended<string> _labels;
+ [AutoNotify] private bool _isCurrentTextValid;
+
public SuggestionLabelsViewModel(int topSuggestionsCount)
{
_sourceLabels = new SourceList<SuggestionLabelViewModel>();

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Receive/ReceiveViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Receive/ReceiveViewModel.cs
@@ -2,7 +2,6 @@ using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Windows.Input;
-using DynamicData.Binding;
using ReactiveUI;
using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.Keys;
@@ -33,7 +32,13 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Receive
SuggestionLabels = new SuggestionLabelsViewModel(3);
- NextCommand = ReactiveCommand.Create(OnNext, SuggestionLabels.WhenAnyValue(x => x.Labels.Count).Select(c => c > 0));
+ var nextCommandCanExecute =
+ SuggestionLabels
+ .WhenAnyValue(x => x.Labels.Count).Select(c => c > 0)
+ .Merge(SuggestionLabels.WhenAnyValue(x => x.IsCurrentTextValid))
+ .Select(_ => SuggestionLabels.Labels.Count > 0 || SuggestionLabels.IsCurrentTextValid);
+
+ NextCommand = ReactiveCommand.Create(OnNext, nextCommandCanExecute);
ShowExistingAddressesCommand = ReactiveCommand.Create(OnShowExistingAddresses);
}

MODIFY
WalletWasabi.Fluent/Views/Wallets/Receive/ReceiveView.axaml
WalletWasabi.Fluent/Views/Wallets/Receive/ReceiveView.axaml
SuggestionsAreCaseSensitive="True"
RestrictInputToSuggestions="False"
Watermark="{StaticResource LabelsWatermarkText}"
+ IsCurrentTextValid="{Binding IsCurrentTextValid, Mode=OneWayToSource}"
Suggestions="{Binding Suggestions}">
<c:TagsBox.Styles>
<Style Selector="c|TagsBox AutoCompleteBox">

allow continue button if the typed text is valid