public StatusHistoryWindow(ObservableCollection <StatusChangeLog> statusChangeLog)
        {
            InitializeComponent();

            StatusHistoryList.ItemsSource = statusChangeLog;

            ((INotifyCollectionChanged)StatusHistoryList.Items).CollectionChanged += PopupNotificationWindow_CollectionChanged;

            // When initially displaying the window, automatically scroll to the most recent entry.
            if (StatusHistoryList.Items.Count > 0)
            {
                StatusHistoryList.ScrollIntoView(StatusHistoryList.Items[StatusHistoryList.Items.Count - 1]);
            }
        }
예제 #2
0
 private void LoadHistoryList(object sender, DoWorkEventArgs e)
 {
     StatusHistoryList.Clear();
     StatusHistoryList = new ObservableCollection <AccountsStatusDetailsSet>(_accountStatusService.GetStatusesById(CurrentAccount.Id));
     _worker.DoWork   -= LoadHistoryList;
 }