Ejemplo n.º 1
0
        /// <summary>
        /// The OnWindowLoaded
        /// </summary>
        /// <param name="view">The view<see cref="HistoryView"/></param>
        private void OnWindowLoaded(HistoryView view)
        {
            view.History.ItemsSource = HistoryModel.Instance.HistoriesByTypeChange;
            CollectionView           collectionView = (CollectionView)CollectionViewSource.GetDefaultView(view.History.ItemsSource);
            PropertyGroupDescription group          = new PropertyGroupDescription("type");

            collectionView.GroupDescriptions.Clear();
            collectionView.GroupDescriptions.Add(group);

            collectionView.SortDescriptions.Clear();
            collectionView.SortDescriptions.Add(new System.ComponentModel.SortDescription("type", System.ComponentModel.ListSortDirection.Ascending));
            collectionView.SortDescriptions.Add(new System.ComponentModel.SortDescription("date", System.ComponentModel.ListSortDirection.Descending));
        }
Ejemplo n.º 2
0
 private void OnRefresh(HistoryView view)
 {
     HistoryModel.Instance.GetHistory();
 }