订单消费统计 商品标题筛选逻辑优化
This commit is contained in:
1 parent
ec9a856bc5
commit
261d580407
6 files changed
+98
-31
No files matched your search
@@ -12,7 +12,8 @@
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<TextBox x:Name="txt" Text="{Binding Text, Mode=TwoWay}" Style="{StaticResource BaseRoundCornerTextBoxStyle}" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
<TextBox x:Name="txt" Text="{Binding Text, Mode=TwoWay}" Style="{StaticResource BaseRoundCornerTextBoxStyle}" BorderBrush="{StaticResource pageColorBrush}"
|
||||
BorderThickness="{Binding TextBorderThickness}"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" VerticalContentAlignment="Center" TextWrapping="{Binding TextWrapping}" TextChanged="txt_TextChanged"/>
|
||||
<TextBlock x:Name="tbWaterMark" Text="{Binding WaterMark}" Margin="4,0,4,0" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="DarkGray"
|
||||
Visibility="{Binding ElementName=txt,Path=Text,Converter={StaticResource WaterMarkVisibility}}"></TextBlock>
|
||||
|
||||
@@ -45,16 +45,24 @@ namespace _29WxOrderWpf.UserControls
|
||||
{
|
||||
get { return (string)GetValue(WaterMarkProperty) == null ? "" : (string)GetValue(WaterMarkProperty); }
|
||||
set { SetValue(WaterMarkProperty, value); }
|
||||
}
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty TextWrappingProperty = DependencyProperty.Register("TextWrapping", typeof(TextWrapping), typeof(UcWaterMarkTextBox), null);
|
||||
public TextWrapping TextWrapping
|
||||
{
|
||||
get { return (TextWrapping)GetValue(TextWrappingProperty); }
|
||||
set { SetValue(TextWrappingProperty, value); }
|
||||
}
|
||||
public static readonly DependencyProperty TextWrappingProperty = DependencyProperty.Register("TextWrapping", typeof(TextWrapping), typeof(UcWaterMarkTextBox), null);
|
||||
public TextWrapping TextWrapping
|
||||
{
|
||||
get { return (TextWrapping)GetValue(TextWrappingProperty); }
|
||||
set { SetValue(TextWrappingProperty, value); }
|
||||
}
|
||||
|
||||
private void txt_TextChanged(object sender, TextChangedEventArgs e)
|
||||
public static readonly DependencyProperty TextBorderThicknessProperty = DependencyProperty.Register("TextBorderThickness", typeof(Thickness), typeof(UcWaterMarkTextBox),
|
||||
new PropertyMetadata(new Thickness(1)));
|
||||
public Thickness TextBorderThickness
|
||||
{
|
||||
get { return (Thickness)GetValue(TextBorderThicknessProperty); }
|
||||
set { SetValue(TextBorderThicknessProperty, value); }
|
||||
}
|
||||
|
||||
private void txt_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
this.Text = txt.Text;
|
||||
TextChanged?.Invoke(this, e);
|
||||
|
||||
Reference in new issue
Block a user