protected override void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            base.UserControl_Loaded(sender, e);

            //nugget: see here: http://social.msdn.microsoft.com/forums/en-US/wpf/thread/63974f4f-d9ee-45af-8499-42f29cbc22ae?prof=required
            //nugget: unfortunately any kind of code driven or user driven sorting blows away custom DataGridColumn.GetCellContent() modifications like my initial hyperlinking approach... i'll have to come back to this
            //gridRemarks_HyperLinkOrderNumbers();

            WPFHelpers.GridSort(gridForms, "Purchased", System.ComponentModel.ListSortDirection.Descending);
            WPFHelpers.GridSort(gridRemarks, new string[] { "Alert", "LastUpdate" }, new ListSortDirection[] { ListSortDirection.Descending, ListSortDirection.Descending });

            SponsorBO.Transactions.CollectionChanged += (s, a) => { if (a.NewItems != null)
                                                                    {
                                                                        TransactionsDataGrid.ScrollIntoView(a.NewItems[0]);
                                                                    }
            };                                                                                                                               //nugget: AutoScroll DataGrid
            rdoHideReturnedTaxForms.IsChecked = true;

            if (SponsorBO.TaxForms_CountReturnedNotFiled > 0)
            {
                ReturnedNotFiledLabel.Background = ReturnedNotFiledLabel.Background.BeginBrushColorAnimation(Colors.Red);
            }

            //btnSuspend_Checked(null, null); //just to jiggle the
        }
示例#2
0
        protected override void UserControlLoaded(object sender, RoutedEventArgs e)
        {
            Sponsor.ReasonConfirmation += SponsorReasonConfirmation;

            InitializePotentialMatchesGridGrouping();

            WPFHelpers.GridSort(gridForms, "Purchased", ListSortDirection.Descending);
            WPFHelpers.GridSort(gridRemarks, new[] { "Alert", "LastUpdate" }, new[] { ListSortDirection.Descending, ListSortDirection.Descending });

            Sponsor.Transactions.CollectionChanged += (s, a) => { if (a.NewItems != null)
                                                                  {
                                                                      TransactionsDataGrid.ScrollIntoView(a.NewItems[0]);
                                                                  }
            };                                                                                                                             //nugget: AutoScroll DataGrid
            rdoHideReturnedTaxForms.IsChecked = true;

            if (Sponsor.TaxFormsCountReturnedNotFiled > 0)
            {
                ReturnedNotFiledLabel.Background = ReturnedNotFiledLabel.Background.BeginBrushColorAnimation(Colors.Red);
            }

            if (Sponsor.Class1TaxFormsCountUnreturned > SettingsModel.MaxClass1FormsCount)
            {
                UnreturnedLabel.Background = UnreturnedLabel.Background.BeginBrushColorAnimation(Colors.Red);
            }

            Sponsor.PropertyChanged += SponsorPropertyChanged;

            gridMembers.ItemContainerGenerator.ContainerFromIndex(0).FindChild <TextBox>(c => c.Name == "txtSSN1").Focus();
        }