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">
<u:MultiComboBox
Name="combo"
PlaceholderText="Please Select"
Watermark="Please Select"
InnerLeftContent="Left"
InnerRightContent="Right"
Classes="ClearButton"

View File

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

View File

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