Beispiel #1
0
        private void DoubleOverlap_Click(object sender, RoutedEventArgs e)
        {
            IEnumerable <ReduxViewModel> items = dataGrid1.ItemsSource as IEnumerable <ReduxViewModel>;

            if (items != null)
            {
                int startIndex = 0;
                if (dataGrid1.SelectedItem != null)
                {
                    startIndex = dataGrid1.SelectedIndex + 1;
                }
                ReduxViewModel prev = null;
                for (int i = startIndex; i < items.Count(); i++)
                {
                    ReduxViewModel item = items.ElementAt(i);
                    if (prev != null)
                    {
                        if (prev.ReduxItem.id == item.ReduxItem.id)
                        {
                            dataGrid1.SelectedIndex = i - 1;
                            dataGrid1.ScrollIntoView(prev);
                            break;
                        }
                    }
                    prev = item;
                }
            }
        }
Beispiel #2
0
 private void MagicButton_Click(object sender, RoutedEventArgs e)
 {
     ReduxViewModel rvm          = ((Button)sender).DataContext as ReduxViewModel;
     bool           partialmatch = rvm.IsPartialMatchWithDescription;
 }
 public ScheduleViewModel(ReduxViewModel rvm, DateTime dayBase)
 {
     ReduxViewModel = rvm;
     DayBase        = dayBase;
 }