tagsbox has its very own watermark.
MODIFY
WalletWasabi.Fluent/Controls/TagsBox.axaml
WalletWasabi.Fluent/Controls/TagsBox.axaml
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
+ <Panel>
+ <TextBlock Name="PART_Watermark"
+ Opacity="0.5"
+ Text="{TemplateBinding Watermark}" />
<ItemsPresenter Name="PART_ItemsPresenter"
Focusable="False"
Items="{TemplateBinding Items}">
MinimumPrefixLength="1"
Focusable="False"
IsTextCompletionEnabled="True"
- Watermark="{Binding #PART_Border.TemplatedParent.Watermark}"
Items="{Binding #PART_Border.TemplatedParent.Suggestions}" />
</c:ConcatenatingWrapPanel.ConcatenatedChildren>
</c:ConcatenatingWrapPanel>
</DataTemplate>
</ItemsPresenter.ItemTemplate>
</ItemsPresenter>
+ </Panel>
</Border>
</DataValidationErrors>
</ControlTemplate>

MODIFY
WalletWasabi.Fluent/Controls/TagsBox.axaml.cs
WalletWasabi.Fluent/Controls/TagsBox.axaml.cs
@@ -50,6 +50,7 @@ namespace WalletWasabi.Fluent.Controls
private CompositeDisposable? _compositeDisposable;
private AutoCompleteBox? _autoCompleteBox;
private TextBox? _internalTextBox;
+ private TextBlock? _watermark;
private StringComparison _stringComparison;
private bool _backspaceEmptyField1;
private bool _backspaceEmptyField2;
@@ -134,6 +135,8 @@ namespace WalletWasabi.Fluent.Controls
presenter.ApplyTemplate();
+ _watermark = e.NameScope.Find<TextBlock>("PART_Watermark");
+
_autoCompleteBox = (presenter.Panel as ConcatenatingWrapPanel)?.ConcatenatedChildren
.OfType<AutoCompleteBox>().FirstOrDefault();
@@ -216,6 +219,18 @@ namespace WalletWasabi.Fluent.Controls
return;
}
+ if (_watermark is { })
+ {
+ if (Items != null && (string.IsNullOrWhiteSpace(autoCompleteBox.Text) || !Items.Any()))
+ {
+ _watermark.IsVisible = true;
+ }
+ else
+ {
+ _watermark.IsVisible = false;
+ }
+ }
+
if (RestrictInputToSuggestions &&
Suggestions is IList<string> suggestions &&
!suggestions.Any(x =>

tagsbox has its very own watermark.