I have a GridView, with a DataTemplate
which is similar to the default one included in the W8.1 Grid App Template. It's populated (through binding) from a CollectionViewSource.
The GridView
's SelectionMode
is Single
and I have subscribed to the GridView
's SelectionChanged
event. Inside this event, I can get the object that is currently selected by using this code -
private void itemGridView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
ItemCanvas icDelete = ((GridView)sender).SelectedItem as ItemCanvas;
string sName = icDelete.Name;
}
How can I access the DataTemplate
of this item, i.e. how can I access the visual location of this item so I can show a Popup where this item is located in the GridView ?