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