搜索Item功能优化

This commit is contained in:
liufei
2022-04-08 16:05:48 +08:00
parent 1457265496
commit eec261ca4a
9 changed files with 78 additions and 22 deletions

View File

@@ -13,8 +13,16 @@ namespace GeekDesk.Converts
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
double menuLeftWidth = double.Parse(value.ToString());
return MainWindow.mainWindow.Width - menuLeftWidth;
string param = parameter as string;
if ("1".Equals(param))
{
double menuLeftWidth = double.Parse(value.ToString());
return MainWindow.mainWindow.Width - menuLeftWidth;
} else
{
double menuLeftWidth = double.Parse(value.ToString());
return (MainWindow.mainWindow.Width - menuLeftWidth) / 2;
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)