0

I have been developing an application containing a semantic zoom (Windows8 store app) where i have bind data in gridview. Binding for Zoom out grid is as follows

 <GridView x:Name="zoomOutGrid" 
                                      VerticalAlignment="Top" Height="400" 
                                      ScrollViewer.VerticalScrollMode="Enabled"
                                      ScrollViewer.HorizontalScrollMode="Disabled"
                                      ScrollViewer.VerticalScrollBarVisibility="Auto"
                                      ScrollViewer.IsVerticalRailEnabled="False"
                                      ScrollViewer.ZoomMode="Disabled"
                                      ManipulationMode="None"
                                      IsSwipeEnabled="True"
                                      SelectionChanged="zoomOutGrid_SelectionChanged"
                                      SelectionMode="Multiple">
                                <GridView.ItemTemplate>
                                    <DataTemplate>
                                        <StackPanel>
                                            <Border >
                                                    <StackPanel Name="stkButtonContentWraper" Orientation="Horizontal">
                                                        <TextBox Name="txtObjectButtonStar" Text="*" Style="{StaticResource Star}"/>
                                                        <Rectangle Name="rectObjectButtonIcon" Fill="{Binding Group.ButtonIcon}" Style="{StaticResource ObjectButtonIcons}"/>
                                                        <StackPanel Orientation="Vertical" Margin="0,10,0,0">
                                                            <TextBlock x:Name="txtBtn"  Text="{Binding Group.Title}" Style="{StaticResource ObjectButtonName}" />
                                                            <TextBlock Name="txtObjectInfo" Text="{Binding Group.ObjectTextInfo}" Style="{StaticResource ObjectTextInformation }"/>
                                                        </StackPanel>
                                                    </StackPanel>
                                            </Border>
                                        </StackPanel>
                                    </DataTemplate>
                                </GridView.ItemTemplate>
                                <GridView.ItemContainerStyle>
                                    <Style TargetType="GridViewItem">
                                        <Setter Property="Margin" Value="0" />
                                        <Setter Property="Padding" Value="0" />
                                    </Style>
                                </GridView.ItemContainerStyle>
                                <GridView.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <WrapGrid ItemWidth="240" 
                                                  Margin="0,0,0,0"
                                                  Orientation="Horizontal" 
                                                  MaximumRowsOrColumns="2">
                                        </WrapGrid>
                                    </ItemsPanelTemplate>
                                </GridView.ItemsPanel>
                            </GridView>

When I select multiple items(right click) / swipe selection , it gives me the same selected index always (that index of first selected item). I want to get all those items selected indexes / selected items , to delete those.

I am not able to figure it out that why its giving me same index always.

Thanks,

nilMoBile
  • 1,932
  • 4
  • 15
  • 20

0 Answers0