using DM_Weight.ViewModels; 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.Navigation; using System.Windows.Shapes; namespace DM_Weight.Views { /// /// CheckStockNewWindow.xaml 的交互逻辑 /// public partial class CheckStockNew2Window : UserControl { //CheckStockNewWindowViewModel vms; public CheckStockNew2Window() { InitializeComponent(); } //private void UserControl_Loaded(object sender, RoutedEventArgs e) //{ // vms = CheckStockNewWindowViewModel.vm; //} ///// ///// 选中行事件 ///// ///// ///// //private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) //{ // if (dgv1.SelectedIndex >= 0) // { // TextBlock txt = dgv1.Columns[0].GetCellContent(dgv1.Items[dgv1.SelectedIndex]) as TextBlock; // if (txt != null) // { // vms.Stock = txt.Text; // } // } //} //private void Item_GotFocus(object sender, RoutedEventArgs e) //{ // var item = (DataGridRow)sender; // FrameworkElement objElement = dgv1.Columns[0].GetCellContent(item); // if (objElement != null) // { // TextBlock objChk = (TextBlock)objElement; // vms.Stock = objChk.Text; // } //} } }