none
ListView ItemClick

    Question

  • I have ListView like this

     <ListView
                    AutomationProperties.AutomationId="ItemListView"
                    AutomationProperties.Name="Grouped Items"
                    ItemsSource="{Binding Source={StaticResource groupedItemsViewSource}}"
                    ItemTemplate="{StaticResource SmallItemTemplate}"
                    ItemContainerStyle="{StaticResource SmallTileStyle}"
                    SelectionMode="None"
                    IsItemClickEnabled="True"
                    ItemClick="ItemView_ItemClick"

    You can see that I use collection for binding elements. And DataTemplate for their layout

    On Item click I want to have position and size of Item that clicked,

    I mean here 

    private void ItemView_ItemClick(object sender, ItemClickEventArgs e)
            {

    I want to have ability to achieve UIElement that lives inside ListView, that elment that was touched.

    I know how to achieve position of UIElement, but I cant find the way how to find this element in ItemClick method

    Thanks for any help.


    Saturday, April 21, 2012 8:24 PM

Answers

All replies