diff --git a/29WxOrderWpf/Converters/MoreThanZeroVisibilityConverter.cs b/29WxOrderWpf/Converters/MoreThanZeroVisibilityConverter.cs new file mode 100644 index 0000000..603d163 --- /dev/null +++ b/29WxOrderWpf/Converters/MoreThanZeroVisibilityConverter.cs @@ -0,0 +1,24 @@ +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Data; + +namespace _29WxOrderWpf.Converters +{ + public class MoreThanZeroVisibilityConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return value.ParseToInt() > 0 ? Visibility.Visible : Visibility.Collapsed; + } + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); // 单向绑定可不实现 + } + } +} diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml index aec7499..f6c080a 100644 --- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml +++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml @@ -1,1177 +1,1191 @@  + x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderListCtrl" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:c="clr-namespace:_29WxOrderWpf.Common" + xmlns:converters="clr-namespace:_29WxOrderWpf.Converters" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:usercontrols="clr-namespace:_29WxOrderWpf.UserControls" + xmlns:utils="clr-namespace:_29WxOrderWpf.Utils" + d:DesignHeight="450" + d:DesignWidth="1560" + Loaded="Window_Loaded" + mc:Ignorable="d"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - 标题包含 - - - 标题不含 - - - - + + + + + 标题包含 + + + 标题不含 + + + + - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - + +