订单分类显示 快递金额明细统计, 快递在线充值 等
This commit is contained in:
1 parent
7264835cc6
commit
e00209cb24
37 files changed
+2764
-520
No files matched your search
@@ -0,0 +1,75 @@
|
||||
using NaiBa.Util.Extension;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace _29WxOrderWpf.UserControls
|
||||
{
|
||||
/// <summary>
|
||||
/// UcWaterMarkTextBox.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class UcWaterMarkTextBox : UserControl
|
||||
{
|
||||
public event Action<object, TextChangedEventArgs> TextChanged;
|
||||
|
||||
public UcWaterMarkTextBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = this;
|
||||
//this.txt.TextChanged
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(UcWaterMarkTextBox), null);
|
||||
public string Text
|
||||
{
|
||||
get { return (string)GetValue(TextProperty) == null ? "" : (string)GetValue(TextProperty); }
|
||||
set { SetValue(TextProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty WaterMarkProperty = DependencyProperty.Register("WaterMark", typeof(string), typeof(UcWaterMarkTextBox), null);
|
||||
public string WaterMark
|
||||
{
|
||||
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); }
|
||||
}
|
||||
|
||||
private void txt_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
this.Text = txt.Text;
|
||||
TextChanged?.Invoke(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
public class WaterMarkVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return value.ParseToString().IsNullOrEmpty() ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException(); // 单向绑定可不实现
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user