ListView name not access in xaml.cs [duplicate]











up vote
0
down vote

favorite













This question already has an answer here:




  • ListBox items return string, when DataTemplate is Button

    1 answer




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;









share|improve this question















marked as duplicate by S.Akbari c#
Users with the  c# badge can single-handedly close c# questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 20 at 15:34


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • can you provide whole xaml ?
    – miechooy
    Nov 19 at 14:21










  • @FastJack Where I can write my xaml code?
    – Alexcandra Khotko
    Nov 20 at 8:20















up vote
0
down vote

favorite













This question already has an answer here:




  • ListBox items return string, when DataTemplate is Button

    1 answer




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;









share|improve this question















marked as duplicate by S.Akbari c#
Users with the  c# badge can single-handedly close c# questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 20 at 15:34


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • can you provide whole xaml ?
    – miechooy
    Nov 19 at 14:21










  • @FastJack Where I can write my xaml code?
    – Alexcandra Khotko
    Nov 20 at 8:20













up vote
0
down vote

favorite









up vote
0
down vote

favorite












This question already has an answer here:




  • ListBox items return string, when DataTemplate is Button

    1 answer




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;









share|improve this question
















This question already has an answer here:




  • ListBox items return string, when DataTemplate is Button

    1 answer




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;




This question already has an answer here:




  • ListBox items return string, when DataTemplate is Button

    1 answer








c# xaml uwp uwp-xaml






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 at 7:28

























asked Nov 19 at 14:17









Alexcandra Khotko

104




104




marked as duplicate by S.Akbari c#
Users with the  c# badge can single-handedly close c# questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 20 at 15:34


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by S.Akbari c#
Users with the  c# badge can single-handedly close c# questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 20 at 15:34


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • can you provide whole xaml ?
    – miechooy
    Nov 19 at 14:21










  • @FastJack Where I can write my xaml code?
    – Alexcandra Khotko
    Nov 20 at 8:20


















  • can you provide whole xaml ?
    – miechooy
    Nov 19 at 14:21










  • @FastJack Where I can write my xaml code?
    – Alexcandra Khotko
    Nov 20 at 8:20
















can you provide whole xaml ?
– miechooy
Nov 19 at 14:21




can you provide whole xaml ?
– miechooy
Nov 19 at 14:21












@FastJack Where I can write my xaml code?
– Alexcandra Khotko
Nov 20 at 8:20




@FastJack Where I can write my xaml code?
– Alexcandra Khotko
Nov 20 at 8:20












1 Answer
1






active

oldest

votes

















up vote
0
down vote













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.






share|improve this answer





















  • Where I can write my full xaml code?
    – Alexcandra Khotko
    Nov 20 at 14:32












  • just intend with 4 spaces with your favourite text editor and post here ;) ... as ANWER, not as comment ;)
    – FastJack
    Nov 20 at 14:41




















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













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.






share|improve this answer





















  • Where I can write my full xaml code?
    – Alexcandra Khotko
    Nov 20 at 14:32












  • just intend with 4 spaces with your favourite text editor and post here ;) ... as ANWER, not as comment ;)
    – FastJack
    Nov 20 at 14:41

















up vote
0
down vote













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.






share|improve this answer





















  • Where I can write my full xaml code?
    – Alexcandra Khotko
    Nov 20 at 14:32












  • just intend with 4 spaces with your favourite text editor and post here ;) ... as ANWER, not as comment ;)
    – FastJack
    Nov 20 at 14:41















up vote
0
down vote










up vote
0
down vote









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.






share|improve this answer












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.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 19 at 14:27









FastJack

26328




26328












  • Where I can write my full xaml code?
    – Alexcandra Khotko
    Nov 20 at 14:32












  • just intend with 4 spaces with your favourite text editor and post here ;) ... as ANWER, not as comment ;)
    – FastJack
    Nov 20 at 14:41




















  • Where I can write my full xaml code?
    – Alexcandra Khotko
    Nov 20 at 14:32












  • just intend with 4 spaces with your favourite text editor and post here ;) ... as ANWER, not as comment ;)
    – FastJack
    Nov 20 at 14:41


















Where I can write my full xaml code?
– Alexcandra Khotko
Nov 20 at 14:32






Where I can write my full xaml code?
– Alexcandra Khotko
Nov 20 at 14:32














just intend with 4 spaces with your favourite text editor and post here ;) ... as ANWER, not as comment ;)
– FastJack
Nov 20 at 14:41






just intend with 4 spaces with your favourite text editor and post here ;) ... as ANWER, not as comment ;)
– FastJack
Nov 20 at 14:41





Popular posts from this blog

If I really need a card on my start hand, how many mulligans make sense? [duplicate]

Alcedinidae

Can an atomic nucleus contain both particles and antiparticles? [duplicate]