步步为盈
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.4 KiB

using System;
using System.Collections.Generic;
using System.Text;
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;
using BBGWY.Controls.Extensions;
using GalaSoft.MvvmLight.Messaging;
namespace BBWY.Client.Views.Ware
{
/// <summary>
/// WareManager.xaml 的交互逻辑
/// </summary>
public partial class WareManager : Page
{
private ScrollViewer scrollviewer_ProductList;
public WareManager()
{
InitializeComponent();
this.Loaded += WareManager_Loaded;
this.Unloaded += WareManager_Unloaded;
Messenger.Default.Register<string>(this, "WareManager_ProductListScrollToTop", (x) =>
{
scrollviewer_ProductList.Dispatcher.Invoke(() => scrollviewer_ProductList.ScrollToTop());
});
}
private void WareManager_Unloaded(object sender, RoutedEventArgs e)
{
Messenger.Default.Unregister(this);
}
private void WareManager_Loaded(object sender, RoutedEventArgs e)
{
scrollviewer_ProductList = listbox_productList.FindFirstVisualChild<ScrollViewer>();
}
}
}