public void UpdateViewFromElement()
 {
     using (isUpdatingView.Set())
     {
         selectionView.SetSelection(attachedElement.SelectedItems);
     }
 }
Ejemplo n.º 2
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext = new View1();
     selectionView.SetSelection(new object[] {
         ((View1)DataContext).Items.GetItemAt(3),
         ((View1)DataContext).Items.GetItemAt(5),
         ((View1)DataContext).Items.GetItemAt(23),
         ((View1)DataContext).Items.GetItemAt(24),
         ((View1)DataContext).Items.GetItemAt(56)
     });
     this.DG.SelectionView = selectionView;
 }