Files
wcs/货架标准上位机/Views/MXWindows/MXPDView.xaml.cs
2024-05-29 18:02:46 +08:00

60 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Ping9719.WpfEx;
using System;
using System.Collections.Generic;
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.Shapes;
using System.Text.RegularExpressions;
using .ViewModel;
namespace
{
public partial class MXPDView : UserControlBase
{
public static MXPDViewModel viewModel { get; set; } = new MXPDViewModel();
public MXPDView()
{
InitializeComponent();
this.DataContext = viewModel;
}
private void DataGrid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
try
{
DataGrid datagrid = sender as DataGrid;
datagrid.UnselectAllCells();
}
catch
{
}
}
private void TextBlock_MouseDown(object sender, MouseButtonEventArgs e)
{
viewModel.RefreshOutOrderList(viewModel.SelectedOutOrderNumber);
}
private void ListView_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
if (!e.Handled)
{
e.Handled = true;
// 激发一个鼠标滚轮事件冒泡给外层ListView接收到
var eventArg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta);
eventArg.RoutedEvent = UIElement.MouseWheelEvent;
eventArg.Source = sender;
var parent = ((Control)sender).Parent as UIElement;
parent.RaiseEvent(eventArg);
}
}
}
}