Renamed PlaceholderText to Watermark for MultiComboBox

This commit is contained in:
Gehongyan
2024-08-21 21:02:57 +08:00
parent f737e02ac3
commit a23ac50ce5
3 changed files with 7 additions and 7 deletions

View File

@@ -14,7 +14,7 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<u:MultiComboBox <u:MultiComboBox
Name="combo" Name="combo"
PlaceholderText="Please Select" Watermark="Please Select"
InnerLeftContent="Left" InnerLeftContent="Left"
InnerRightContent="Right" InnerRightContent="Right"
Classes="ClearButton" Classes="ClearButton"

View File

@@ -53,7 +53,7 @@
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsVisible="False" IsVisible="False"
Opacity="0.3" Opacity="0.3"
Text="{TemplateBinding PlaceholderText}" /> Text="{TemplateBinding Watermark}" />
<ScrollViewer <ScrollViewer
Grid.Column="1" Grid.Column="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"

View File

@@ -88,13 +88,13 @@ public class MultiComboBox: SelectingItemsControl, IInnerContentControl
set => SetValue(SelectedItemTemplateProperty, value); set => SetValue(SelectedItemTemplateProperty, value);
} }
public static readonly StyledProperty<string?> PlaceholderTextProperty = public static readonly StyledProperty<string?> WatermarkProperty =
ComboBox.PlaceholderTextProperty.AddOwner<MultiComboBox>(); TextBox.WatermarkProperty.AddOwner<MultiComboBox>();
public string? PlaceholderText public string? Watermark
{ {
get => GetValue(PlaceholderTextProperty); get => GetValue(WatermarkProperty);
set => SetValue(PlaceholderTextProperty, value); set => SetValue(WatermarkProperty, value);
} }
static MultiComboBox() static MultiComboBox()