生成条码优化

This commit is contained in:
hehaibing-1996
2024-05-13 09:18:49 +08:00
parent f57b79d0fc
commit 88cbe5d052
22 changed files with 262 additions and 220 deletions

View File

@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.UI.WebControls;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
@ -37,7 +38,7 @@ namespace 货架标准上位机
if (viewModel.SelectedataGridItem != null)
{
viewModel.SelectedataGridItem.IsSelected = !viewModel.SelectedataGridItem.IsSelected;
dataGrid.UnselectAllCells();//取消选中 避免手动点击check选项时反选失败 和重新点击该项时反选失败
//dataGrid.UnselectAllCells();
}
}
@ -73,5 +74,20 @@ namespace 货架标准上位机
}
}
}
private void DataGrid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
// 获取点击的 DataGridRow
var hitTestInfo = VisualTreeHelper.HitTest(dataGrid, e.GetPosition(dataGrid));
if (hitTestInfo.VisualHit is DataGridRow row)
{
// 现在你可以根据 row 做一些事情,比如选中它(如果它还没有被选中)
if (!row.IsSelected)
{
row.IsSelected = true;
}
}
}
}
}