Quantcast
Channel: Silverlight Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 801

Commented Issue: howto get the selected ContextMenu item in a LongListSelector? [10167]

$
0
0
<p>I have a problem, I need to get the selected Item from a ContextMenu in a LongListSelector.</p>
<p>Before I was using a normal ListBox and I did it with:</p>
<p>&nbsp;</p>
<p> var selectedItem = myList.ItemContainerGenerator.ContainerFromItem(menuItem.DataContext) as ListBoxItem;</p>
<p>&nbsp;</p>
<p>But now I&#39;m using the LongListSelector and this method doesn&#39;t work.</p>
<p>&nbsp;</p>
<p>Who can I do it?</p>

Comments: ** Comment from web user: lirkki **

If you only need the DataContext of the selected LongListSelector item, this should help you: http://stackoverflow.com/questions/8853909/howto-get-the-selected-contextmenu-item-in-a-longlistselector

If you really need the LongListSelector ListBoxItem (the actual UI control), then I don't know how to help.


Viewing all articles
Browse latest Browse all 801

Trending Articles