0

I have pivot with listView in my xaml. ListView has name "NoteItems: I cannot write full my xaml code, so I gave link to documents. https://drive.google.com/open?id=1wcbvdex25zV8_AYWjLfLC9fs9T1XsSo9

But xaml.cs has error "The name "NoteItems" does not exist in the current context" in this string:

            NoteItems.DragOver += OnStepsListViewDragOver;
        (NoteItems.ItemsSource as INotifyCollectionChanged).CollectionChanged += OnStepsCollectionChanged;

1 Answers1

0

Your item resides in an ItemTemplate, so you can't access it via CodeBehind or anywhere outside the scope.

Think of it this way: at design time, there are no items and during runtime there are n!

So which item you wish your source to access? -> impossible.

what could work is that you name your pivot and work your way down to the items.. but I would need more information about your xaml structure to give a definite answer on that.

FastJack
  • 866
  • 1
  • 10
  • 11